Skip to content

Commit

Permalink
fix: wrong debug_assert in OrderedFloat for NaN (#1547)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanCode authored and sxyazi committed Aug 24, 2024
1 parent c9d7436 commit 69c20d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions yazi-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use clap::Parser;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
yazi_shared::init();

if std::env::args_os().nth(1).is_some_and(|s| s == "-V" || s == "--version") {
println!(
"Ya {} ({} {})",
Expand Down
4 changes: 2 additions & 2 deletions yazi-config/preset/yazi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ delete_offset = [ 0, 0, 70, 20 ]
overwrite_title = "Overwrite file?"
overwrite_content = "Will overwrite the following file:"
overwrite_origin = "center"
overwrite_offset = [ 0, 0, 50, 20 ]
overwrite_offset = [ 0, 0, 50, 15 ]

# quit
quit_title = "Quit?"
quit_content = "The following task is still running, are you sure you want to quit?"
quit_origin = "center"
quit_offset = [ 0, 0, 50, 20 ]
quit_offset = [ 0, 0, 50, 15 ]

[select]
open_title = "Open with:"
Expand Down
2 changes: 1 addition & 1 deletion yazi-shared/src/number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct OrderedFloat(f64);
impl OrderedFloat {
#[inline]
pub fn new(t: f64) -> Self {
debug_assert!(t.is_nan());
debug_assert!(!t.is_nan());
Self(t)
}

Expand Down

0 comments on commit 69c20d4

Please sign in to comment.