Update toolchain to Rust 1.77

This commit is contained in:
cloudhead 2024-03-26 10:03:11 +01:00
parent e40e642e76
commit 5b5a6842c1
No known key found for this signature in database
8 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,5 @@
pub mod identity;
pub use identity::{Name, Person, Project, RemoteProject};
pub use identity::{Person, Project, RemoteProject};
pub mod storage;
pub use storage::Storage;

View File

@ -17,6 +17,6 @@ pub(crate) mod oid {
/// Convert from an [`Oid`] to an [`ObjectId`].
pub fn to_object_id(oid: Oid) -> ObjectId {
ObjectId::try_from(oid.as_bytes()).expect("invalid git-ext Oid")
ObjectId::from(oid.as_bytes())
}
}

View File

@ -4,7 +4,6 @@ use radicle::crypto::PublicKey;
use radicle::git::{self, Component, Namespaced, Oid, Qualified};
use thiserror::Error;
pub use radicle::git::refs::storage;
pub use radicle::git::refs::storage::Special;
use crate::git::refs::{Policy, Update};

View File

@ -373,7 +373,7 @@ impl<G: Signer + cyphernet::Ecdh> NodeHandle<G> {
for line in io::BufReader::new(io::Cursor::new(&result.stdout))
.lines()
.flatten()
.map_while(Result::ok)
{
log::debug!(target: "test", "rad {cmd}: {line}");
}

View File

@ -280,8 +280,7 @@ impl Decode for PublicKey {
fn decode<R: io::Read + ?Sized>(reader: &mut R) -> Result<Self, Error> {
let buf: [u8; 32] = Decode::decode(reader)?;
PublicKey::try_from(buf)
.map_err(|e| Error::Io(io::Error::new(io::ErrorKind::InvalidInput, e.to_string())))
Ok(PublicKey::from(buf))
}
}

View File

@ -52,6 +52,7 @@ impl Editor {
let mut file = fs::OpenOptions::new()
.write(true)
.create(true)
.truncate(true)
.open(&self.path)?;
if file.metadata()?.len() == 0 {

View File

@ -534,7 +534,7 @@ impl Patch {
/// Get the merges.
pub fn merges(&self) -> impl Iterator<Item = (&ActorId, &Merge)> {
self.merges.iter().map(|(a, m)| (a, m))
self.merges.iter()
}
/// Reference to the Git object containing the code on the latest revision.

View File

@ -1 +1 @@
1.74
1.77