mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: wrong debug_assert in OrderedFloat for NaN (#1547)
This commit is contained in:
parent
c9d74360bf
commit
69c20d4dd3
3 changed files with 5 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ use clap::Parser;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> anyhow::Result<()> {
|
async fn main() -> anyhow::Result<()> {
|
||||||
|
yazi_shared::init();
|
||||||
|
|
||||||
if std::env::args_os().nth(1).is_some_and(|s| s == "-V" || s == "--version") {
|
if std::env::args_os().nth(1).is_some_and(|s| s == "-V" || s == "--version") {
|
||||||
println!(
|
println!(
|
||||||
"Ya {} ({} {})",
|
"Ya {} ({} {})",
|
||||||
|
|
|
||||||
|
|
@ -182,13 +182,13 @@ delete_offset = [ 0, 0, 70, 20 ]
|
||||||
overwrite_title = "Overwrite file?"
|
overwrite_title = "Overwrite file?"
|
||||||
overwrite_content = "Will overwrite the following file:"
|
overwrite_content = "Will overwrite the following file:"
|
||||||
overwrite_origin = "center"
|
overwrite_origin = "center"
|
||||||
overwrite_offset = [ 0, 0, 50, 20 ]
|
overwrite_offset = [ 0, 0, 50, 15 ]
|
||||||
|
|
||||||
# quit
|
# quit
|
||||||
quit_title = "Quit?"
|
quit_title = "Quit?"
|
||||||
quit_content = "The following task is still running, are you sure you want to quit?"
|
quit_content = "The following task is still running, are you sure you want to quit?"
|
||||||
quit_origin = "center"
|
quit_origin = "center"
|
||||||
quit_offset = [ 0, 0, 50, 20 ]
|
quit_offset = [ 0, 0, 50, 15 ]
|
||||||
|
|
||||||
[select]
|
[select]
|
||||||
open_title = "Open with:"
|
open_title = "Open with:"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ pub struct OrderedFloat(f64);
|
||||||
impl OrderedFloat {
|
impl OrderedFloat {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new(t: f64) -> Self {
|
pub fn new(t: f64) -> Self {
|
||||||
debug_assert!(t.is_nan());
|
debug_assert!(!t.is_nan());
|
||||||
Self(t)
|
Self(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue