Merge remote-tracking branch 'origin/mr/186'
This commit is contained in:
commit
eadada1941
|
@ -8,8 +8,8 @@ set -e
|
||||||
echo '+cargo fmt --all -- --check'
|
echo '+cargo fmt --all -- --check'
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
|
||||||
echo '+cargo clippy --all-features -- -D warnings'
|
echo '+cargo clippy --all-features --all-targets -- -D warnings'
|
||||||
cargo clippy --all-features -- -D warnings
|
cargo clippy --all-features --all-targets -- -D warnings
|
||||||
|
|
||||||
echo '+cargo test --all'
|
echo '+cargo test --all'
|
||||||
cargo test --all
|
cargo test --all
|
||||||
|
|
|
@ -8,8 +8,8 @@ set -e
|
||||||
echo '+cargo fmt --all -- --check'
|
echo '+cargo fmt --all -- --check'
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
|
||||||
echo '+cargo clippy --all-features -- -D warnings'
|
echo '+cargo clippy --all-features --all-targets -- -D warnings'
|
||||||
cargo clippy --all-features -- -D warnings
|
cargo clippy --all-features --all-targets -- -D warnings
|
||||||
|
|
||||||
echo '+cargo test --all'
|
echo '+cargo test --all'
|
||||||
cargo test --all
|
cargo test --all
|
||||||
|
|
|
@ -13,7 +13,7 @@ rust-latest:
|
||||||
- cargo build --verbose --target x86_64-unknown-linux-gnu
|
- cargo build --verbose --target x86_64-unknown-linux-gnu
|
||||||
- cargo test --verbose --target x86_64-unknown-linux-gnu
|
- cargo test --verbose --target x86_64-unknown-linux-gnu
|
||||||
- rustup component add clippy rustfmt
|
- rustup component add clippy rustfmt
|
||||||
- cargo clippy --all-features --tests -- -D warnings
|
- cargo clippy --all-features --all-targets -- -D warnings
|
||||||
- cargo fmt -- --check
|
- cargo fmt -- --check
|
||||||
- cp cargo-audit $CARGO_HOME/bin/ || cargo install cargo-audit
|
- cp cargo-audit $CARGO_HOME/bin/ || cargo install cargo-audit
|
||||||
- ./maint/cargo_audit.sh
|
- ./maint/cargo_audit.sh
|
||||||
|
@ -45,7 +45,7 @@ rust-nightly:
|
||||||
- cargo test --verbose --target x86_64-unknown-linux-gnu --all-features
|
- cargo test --verbose --target x86_64-unknown-linux-gnu --all-features
|
||||||
- rustup component add clippy
|
- rustup component add clippy
|
||||||
# We check these extra warnings on CI only, since we don't want to forbid them while developing.
|
# We check these extra warnings on CI only, since we don't want to forbid them while developing.
|
||||||
- cargo clippy --all-features -- -D clippy::dbg_macro -D clippy::print_stdout -D clippy::print_stderr
|
- cargo clippy --all-features --tests -- -D clippy::dbg_macro -D clippy::print_stdout -D clippy::print_stderr
|
||||||
- RUSTDOCFLAGS="-Dwarnings" cargo doc --all-features --document-private-items
|
- RUSTDOCFLAGS="-Dwarnings" cargo doc --all-features --document-private-items
|
||||||
tags:
|
tags:
|
||||||
- amd64
|
- amd64
|
||||||
|
|
|
@ -567,7 +567,7 @@ rI2rzhqqBIhzFFaYuxyRAhkSBxCKTdl6X0k74ahT3MM=
|
||||||
";
|
";
|
||||||
|
|
||||||
assert!(public.verify(&digest, &to_der(sig)).is_ok());
|
assert!(public.verify(&digest, &to_der(sig)).is_ok());
|
||||||
assert!(!public.verify(&wrong_digest, &to_der(sig)).is_ok());
|
assert!(public.verify(&wrong_digest, &to_der(sig)).is_err());
|
||||||
|
|
||||||
let val = rsa::ValidatableRsaSignature::new(&public, &to_der(sig), &digest);
|
let val = rsa::ValidatableRsaSignature::new(&public, &to_der(sig), &digest);
|
||||||
|
|
||||||
|
|
|
@ -530,13 +530,11 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn bounded_from_i32() {
|
fn bounded_from_i32() {
|
||||||
let mut x: Result<BoundedInt32<-100, 100>, Error>;
|
let x: Result<BoundedInt32<-100, 100>, _> = 50.try_into();
|
||||||
|
|
||||||
x = (50).try_into();
|
|
||||||
let y: i32 = x.unwrap().into();
|
let y: i32 = x.unwrap().into();
|
||||||
assert_eq!(y, 50);
|
assert_eq!(y, 50);
|
||||||
|
|
||||||
x = (1000).try_into();
|
let x: Result<BoundedInt32<-100, 100>, _> = 1000.try_into();
|
||||||
assert!(x.is_err());
|
assert!(x.is_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue