Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use i64 over f64 for pos
  • Loading branch information
philipp-spiess committed Sep 25, 2024
commit c8fc77b4590d22acd7a88bad16bcf221829be36a
8 changes: 4 additions & 4 deletions crates/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ pub struct Scanner {
#[derive(Debug, Clone)]
#[napi(object)]
pub struct CandidateWithPosition {
/// Base path of the glob
// The candidate string
pub candidate: String,

/// Glob pattern
pub position: f64,
// The position of the candidate inside the content file
pub position: i64,
}

#[napi]
Expand Down Expand Up @@ -129,7 +129,7 @@ impl Scanner {
.into_iter()
.map(|(candidate, position)| CandidateWithPosition {
candidate,
position: position as f64,
position: position as i64,
})
.collect()
}
Expand Down