mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-03-26 12:13:08 +00:00
clippy
This commit is contained in:
parent
79d70b3a66
commit
953a1dacd3
@ -535,31 +535,31 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn validity_window_from_range() {
|
||||
let w = ValidityWindow::try_from(5u64..10).unwrap();
|
||||
let w = ValidityWindow::try_from(5_u64..10).unwrap();
|
||||
assert_eq!(w.from(), Some(5));
|
||||
assert_eq!(w.to(), Some(10));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validity_window_from_range_empty_is_invalid() {
|
||||
assert!(ValidityWindow::try_from(5u64..5).is_err());
|
||||
assert!(ValidityWindow::try_from(5_u64..5).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validity_window_from_range_inverted_is_invalid() {
|
||||
assert!(ValidityWindow::try_from(10u64..5).is_err());
|
||||
assert!(ValidityWindow::try_from(10_u64..5).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validity_window_from_range_from() {
|
||||
let w: ValidityWindow = (5u64..).into();
|
||||
let w: ValidityWindow = (5_u64..).into();
|
||||
assert_eq!(w.from(), Some(5));
|
||||
assert_eq!(w.to(), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validity_window_from_range_to() {
|
||||
let w: ValidityWindow = (..10u64).into();
|
||||
let w: ValidityWindow = (..10_u64).into();
|
||||
assert_eq!(w.from(), None);
|
||||
assert_eq!(w.to(), Some(10));
|
||||
}
|
||||
|
||||
@ -7,9 +7,9 @@ use risc0_zkvm::serde::to_vec;
|
||||
/// A program that sets a validity window on its output and chains to another program with a
|
||||
/// potentially different validity window.
|
||||
///
|
||||
/// Instruction: (from_id, until_id, chained_program_id, chained_from, chained_until)
|
||||
/// The initial output uses [from_id, until_id) and chains to `chained_program_id` with
|
||||
/// [chained_from, chained_until).
|
||||
/// Instruction: (`from_id`, `until_id`, `chained_program_id`, `chained_from`, `chained_until`)
|
||||
/// The initial output uses [`from_id`, `until_id`) and chains to `chained_program_id` with
|
||||
/// [`chained_from`, `chained_until`).
|
||||
type Instruction = (
|
||||
Option<BlockId>,
|
||||
Option<BlockId>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user