Merge remote-tracking branch 'origin/nix/rust-1.67'

* origin/nix/rust-1.67:
  github: revert toolchain back to stable
  nix: update to rust-1.67

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
This commit is contained in:
Fintan Halpenny
2023-01-30 12:38:03 +00:00
28 changed files with 41 additions and 48 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.66.1
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v1
- run: ./scripts/ci/lint
+1 -1
View File
@@ -14,7 +14,7 @@ keywords = ["git", "radicle"]
thiserror = "1"
[dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
+2 -2
View File
@@ -276,14 +276,14 @@ impl ToString for Commit {
writeln!(buf, "tree {}", self.tree).ok();
for parent in &self.parents {
writeln!(buf, "parent {}", parent).ok();
writeln!(buf, "parent {parent}").ok();
}
writeln!(buf, "author {}", self.author).ok();
writeln!(buf, "committer {}", self.committer).ok();
for (name, value) in self.headers.iter() {
writeln!(buf, "{} {}", name, value.replace('\n', "\n ")).ok();
writeln!(buf, "{name} {}", value.replace('\n', "\n ")).ok();
}
writeln!(buf).ok();
write!(buf, "{}", self.message.trim()).ok();
+1 -1
View File
@@ -18,7 +18,7 @@ test = []
path = ".."
[dev-dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
+1 -1
View File
@@ -23,6 +23,6 @@ fn valid_commits() {
for oid in walk.take(20) {
let oid = oid.unwrap();
let commit = Commit::read(&repo, oid);
assert!(commit.is_ok(), "Oid: {}, Error: {:?}", oid, commit)
assert!(commit.is_ok(), "Oid: {oid}, Error: {commit:?}")
}
}
+2 -2
View File
@@ -13,7 +13,7 @@ thiserror = "1"
either = "1.8.0"
[dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
@@ -21,7 +21,7 @@ features = ["vendored-libgit2"]
path = "../git-ref-format"
[dependencies.libgit2-sys]
version = ">= 0.12.24"
version = ">= 0.14.2"
default-features = false
features = ["vendored"]
+2 -2
View File
@@ -540,10 +540,10 @@ impl odb::Write for Write {
self.as_raw().blob(data).map(Oid::from)
}
fn write_commit<'b>(
fn write_commit(
&self,
tree: &odb::Tree,
parents: &[&odb::Commit<'b>],
parents: &[&odb::Commit<'_>],
message: &str,
) -> Result<Oid, Self::WriteCommit> {
let author = self.info.signature()?;
+2 -2
View File
@@ -36,10 +36,10 @@ pub trait Write: Read {
/// The commit will not be associated with any reference. If this is
/// required then you can use the [`Oid`] as the target for a
/// [`crate::refdb::Update`].
fn write_commit<'a>(
fn write_commit(
&self,
tree: &Tree,
parents: &[&Commit<'a>],
parents: &[&Commit<'_>],
message: &str,
) -> Result<Oid, Self::WriteCommit>;
+1 -1
View File
@@ -21,7 +21,7 @@ proptest = "1"
path = ".."
[dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
+1 -1
View File
@@ -8,7 +8,7 @@ pub type TmpRepo = WithTmpDir<Repository>;
pub fn writer(user: UserInfo) -> TmpWriter {
WithTmpDir::new(|path| {
Write::open(path, user)
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, format!("{}", e)))
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))
})
.unwrap()
}
+1 -1
View File
@@ -58,7 +58,7 @@ features = ["async-client"]
# compat
[dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
optional = true
+1 -1
View File
@@ -27,7 +27,7 @@ where
W: AsyncWrite + Unpin,
{
pub fn new(repo: BString, recv: R, send: W) -> Self {
let url = format!("rad://{}", repo);
let url = format!("rad://{repo}");
let inner = Connection::new(
recv,
send,
+1 -1
View File
@@ -147,7 +147,7 @@ where
std::env::vars()
.filter(|(key, _)| key == "PATH" || key.starts_with("GIT_TRACE")),
)
.env("GIT_PROTOCOL", format!("version={}", protocol_version))
.env("GIT_PROTOCOL", format!("version={protocol_version}"))
.env("GIT_NAMESPACE", namespace)
.args([
"-c",
+1 -4
View File
@@ -64,10 +64,7 @@ where
.arg("-c")
.arg("uploadpack.hiderefs=refs/")
.arg("-c")
.arg(format!(
"uploadpack.hiderefs=!refs/namespaces/{}",
namespace
));
.arg(format!("uploadpack.hiderefs=!refs/namespaces/{namespace}",));
for r in unhide {
cmd.arg("-c")
+1 -1
View File
@@ -22,7 +22,7 @@ futures_ringbuf = "0.3"
tempfile = "3.3"
[dev-dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
+6 -6
View File
@@ -5,10 +5,10 @@
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "351d8bc316bf901a81885bab5f52687ec8ccab6e",
"sha256": "1yzhz7ihkh6p2sxhp3amqfbmm2yqzaadqqii1xijymvl8alw5rrr",
"rev": "689d0e5539eddd0b0f566aee7bb18629eee7df74",
"sha256": "1rld3lk42l6b01f2gcrhq8qm9vry1awmfl29zmpiqda9dy89vbx0",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/351d8bc316bf901a81885bab5f52687ec8ccab6e.tar.gz",
"url": "https://github.com/nmattia/niv/archive/689d0e5539eddd0b0f566aee7bb18629eee7df74.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
@@ -29,10 +29,10 @@
"homepage": "",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "7da2f6b3a0c32f661cb2864d7fbd1d7e6f0c7543",
"sha256": "1daw246p4aimvx9h3cf034dsyimh9d2ww19v4fx45mcmlqw1mx42",
"rev": "7093dfcd21df83026ee20426af80bf2072e2da92",
"sha256": "0qp84wa1imc0cij7hv5y8wy04z0nh9d444k1wabdli3prcqq3pvx",
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/7da2f6b3a0c32f661cb2864d7fbd1d7e6f0c7543.tar.gz",
"url": "https://github.com/oxalica/rust-overlay/archive/7093dfcd21df83026ee20426af80bf2072e2da92.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ percent-encoding = "2"
thiserror = "1"
[dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
+2 -2
View File
@@ -340,7 +340,7 @@ impl OneLevel {
}
pub fn into_qualified(self, category: RefLike) -> Qualified {
Qualified(format!("refs/{}/{}", category, self))
Qualified(format!("refs/{category}/{self}"))
}
}
@@ -454,7 +454,7 @@ impl From<RefLike> for Qualified {
if path.starts_with("refs/") {
Self(path)
} else {
Self(format!("refs/heads/{}", path))
Self(format!("refs/heads/{path}"))
}
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ serde = "1"
serde_json = "1"
[dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
+1 -1
View File
@@ -17,7 +17,7 @@ thiserror = "1.0.30"
tracing = "0.1"
[dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
+1 -1
View File
@@ -535,7 +535,7 @@ impl<S, T> SymbolicRef<S, T> {
let source = Into::<ext::RefLike>::into(&self.source);
let target = Into::<ext::RefLike>::into(&self.target);
let reflog_msg = &format!("creating symbolic ref {} -> {}", source, target);
let reflog_msg = &format!("creating symbolic ref {source} -> {target}");
tracing::debug!("{}", reflog_msg);
let _ = repo.refname_to_id(target.as_str())?;
+1 -1
View File
@@ -62,7 +62,7 @@ where
let src = Into::<ext::RefspecPattern>::into(&self.src);
let dst = Into::<ext::RefspecPattern>::into(&self.dst);
write!(f, "{}:{}", src, dst)
write!(f, "{src}:{dst}")
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ nonempty = "0.5"
thiserror = "1.0"
[dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]
+1 -1
View File
@@ -60,7 +60,7 @@ fn main() {
unpack(git_platinum_tarball, target).expect("Failed to unpack git-platinum");
println!("cargo:rerun-if-changed={}", git_platinum_tarball);
println!("cargo:rerun-if-changed={git_platinum_tarball}");
}
fn unpack(archive_path: impl AsRef<Path>, target: impl AsRef<Path>) -> anyhow::Result<()> {
+1 -1
View File
@@ -45,7 +45,7 @@ fn main() {
print_directory(&root, &repo, 0);
let elapsed_millis = now.elapsed().as_millis();
println!("browse with print: {} ms", elapsed_millis);
println!("browse with print: {elapsed_millis} ms");
}
fn print_directory(d: &Directory, repo: &Repository, indent_level: usize) {
+3 -3
View File
@@ -40,7 +40,7 @@ fn get_options_or_exit() -> Options {
match Options::parse(std::env::args()) {
Ok(options) => options,
Err(message) => {
println!("{}", message);
println!("{message}");
std::process::exit(1);
},
}
@@ -50,7 +50,7 @@ fn init_repository_or_exit(path_to_repo: &str) -> Repository {
match Repository::open(path_to_repo) {
Ok(repo) => repo,
Err(e) => {
println!("Failed to create repository: {:?}", e);
println!("Failed to create repository: {e:?}");
std::process::exit(1);
},
}
@@ -74,7 +74,7 @@ fn print_diff_summary(diff: &Diff, elapsed_nanos: u128) {
diff.modified.len(),
diff.added.len() + diff.deleted.len() + diff.modified.len()
);
println!("diff took {} nanos ", elapsed_nanos);
println!("diff took {elapsed_nanos} nanos ");
}
struct Options {
+2 -6
View File
@@ -91,9 +91,7 @@ impl File {
pub(crate) fn new(name: String, prefix: PathBuf, id: Oid) -> Self {
debug_assert!(
!prefix.ends_with(&name),
"prefix = {:?}, name = {}",
prefix,
name
"prefix = {prefix:?}, name = {name}",
);
Self { name, prefix, id }
}
@@ -307,9 +305,7 @@ impl Directory {
pub(crate) fn new(name: String, prefix: PathBuf, id: Oid) -> Self {
debug_assert!(
name.is_empty() || !prefix.ends_with(&name),
"prefix = {:?}, name = {}",
prefix,
name
"prefix = {prefix:?}, name = {name}",
);
Self { name, prefix, id }
}
+1 -1
View File
@@ -19,7 +19,7 @@ proptest = "1"
serde_json = "1"
[dev-dependencies.git2]
version = "0.15.0"
version = "0.16.1"
default-features = false
features = ["vendored-libgit2"]