Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions libgit2-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#![allow(clippy::needless_borrows_for_generic_args)]
#![allow(clippy::unnecessary_map_or)]

use std::env;
use std::fs;
use std::io;
Expand Down Expand Up @@ -96,7 +93,7 @@ fn main() {
// dependency graph activates `vendored` feature, there is no way to revert
// it back. This env var serves as a workaround for this purpose.
println!("cargo:rerun-if-env-changed=LIBGIT2_NO_VENDOR");
let forced_no_vendor = env::var_os("LIBGIT2_NO_VENDOR").map_or(false, |s| s != "0");
let forced_no_vendor = env::var_os("LIBGIT2_NO_VENDOR").is_some_and(|s| s != "0");

if forced_no_vendor {
if try_system_libgit2(unstable_sha256).is_err() {
Expand All @@ -123,7 +120,7 @@ The build is now aborting. To disable, unset the variable or use `LIBGIT2_NO_VEN

if !Path::new("libgit2/src").exists() {
let _ = Command::new("git")
.args(&["submodule", "update", "--init", "libgit2"])
.args(["submodule", "update", "--init", "libgit2"])
.status();
}

Expand Down
3 changes: 1 addition & 2 deletions libgit2-sys/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![doc(html_root_url = "https://docs.rs/libgit2-sys/0.18")]
#![allow(non_camel_case_types, unused_extern_crates)]
#![allow(clippy::legacy_numeric_constants)]

// This is required to link libz when libssh2-sys is not included.
extern crate libz_sys as libz;
Expand Down Expand Up @@ -2085,7 +2084,7 @@ pub type git_commit_create_cb = Option<
) -> c_int,
>;

pub const GIT_REBASE_NO_OPERATION: usize = usize::max_value();
pub const GIT_REBASE_NO_OPERATION: usize = usize::MAX;

#[repr(C)]
pub struct git_rebase_options {
Expand Down