Skip to content

Commit

Permalink
Use as_bytes().len() to get comment length
Browse files Browse the repository at this point in the history
Method `count_bytes()` has been added fairly recently, in 1.79.0.
This change is to support older compilers.
  • Loading branch information
tduda-fudosecurity authored and yodaldevoid committed Nov 5, 2024
1 parent 3a68a67 commit c9e1d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/knownhosts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ impl KnownHosts {
key.as_ptr() as *mut _,
key.len() as size_t,
comment.as_ptr() as *const _,
comment.count_bytes() as size_t,
comment.as_bytes().len() as size_t,
flags,
null_mut(),
);
Expand Down

0 comments on commit c9e1d86

Please sign in to comment.