Skip to content

Commit

Permalink
remove superfluous types
Browse files Browse the repository at this point in the history
  • Loading branch information
bryevdv committed Oct 6, 2023
1 parent 7f54477 commit 5c0d57a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1732,8 +1732,8 @@ impl ProfApp {
return;
}

let duration: i64 = percent.apply_to(cx.view_interval.duration_ns());
let sign: i64 = match dir {
let duration = percent.apply_to(cx.view_interval.duration_ns());
let sign = match dir {
PanDirection::Left => -1,
PanDirection::Right => 1,
};
Expand Down
16 changes: 8 additions & 8 deletions src/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,10 @@ mod tests {

#[test]
fn test_translate_positive() {
let start: Timestamp = Timestamp::parse("234.5 ms").unwrap();
let end: Timestamp = Timestamp::parse("235.5 ms").unwrap();
let expected_start: Timestamp = Timestamp(start.0 + 250);
let expected_end: Timestamp = Timestamp(end.0 + 250);
let start = Timestamp::parse("234.5 ms").unwrap();
let end = Timestamp::parse("235.5 ms").unwrap();
let expected_start = Timestamp(start.0 + 250);
let expected_end = Timestamp(end.0 + 250);
assert_eq!(
Interval::new(start, end).translate(250),
Interval::new(expected_start, expected_end)
Expand All @@ -337,10 +337,10 @@ mod tests {

#[test]
fn test_translate_negative() {
let start: Timestamp = Timestamp::parse("234.5 ms").unwrap();
let end: Timestamp = Timestamp::parse("235.5 ms").unwrap();
let expected_start: Timestamp = Timestamp(start.0 - 250);
let expected_end: Timestamp = Timestamp(end.0 - 250);
let start = Timestamp::parse("234.5 ms").unwrap();
let end = Timestamp::parse("235.5 ms").unwrap();
let expected_start = Timestamp(start.0 - 250);
let expected_end = Timestamp(end.0 - 250);
assert_eq!(
Interval::new(start, end).translate(-250),
Interval::new(expected_start, expected_end)
Expand Down

0 comments on commit 5c0d57a

Please sign in to comment.