Branch out garage_model from 0.1.0 to fix incompatibility with garage_util 0.1.1

This commit is contained in:
Alex 2021-01-15 18:21:51 +01:00
parent 3b0b11085e
commit c21317dc58
4 changed files with 494 additions and 826 deletions

1310
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,8 @@ members = [
"src/rpc",
"src/table",
"src/model",
"src/api",
"src/garage",
#"src/api",
#"src/garage",
]
[profile.dev]

View File

@ -1,6 +1,6 @@
[package]
name = "garage_model"
version = "0.1.0"
name = "garage_model_010b"
version = "0.0.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "GPL-3.0"

View File

@ -123,7 +123,7 @@ impl BlockManager {
Message::PutBlock(m) => self.write_block(&m.hash, &m.data).await,
Message::GetBlock(h) => self.read_block(h).await,
Message::NeedBlockQuery(h) => self.need_block(h).await.map(Message::NeedBlockReply),
_ => Err(Error::BadRequest(format!("Unexpected RPC message"))),
_ => Err(Error::BadRPC(format!("Unexpected RPC message"))),
}
}