Skip to content

Commit 1e315c8

Browse files
authored
Update the unit database. (#25)
* Update units * Clippy updates
1 parent 92672c3 commit 1e315c8

File tree

9 files changed

+1355
-1015
lines changed

9 files changed

+1355
-1015
lines changed

src/c_api/number.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub unsafe extern "C" fn haystack_value_number_has_unit(val: *const Value) -> Re
9999
/// # use crate::libhaystack::val::Value;
100100
/// # use crate::libhaystack::c_api::value::*;
101101
/// # use crate::libhaystack::c_api::number::*;
102-
/// let unit = std::ffi::CString::new("s").unwrap();
102+
/// let unit = std::ffi::CString::new("sec").unwrap();
103103
/// # unsafe {
104104
/// let val = haystack_value_make_number_with_unit(42.0, unit.as_ptr());
105105
/// # let val = Box::<Value>::leak(val.unwrap());

src/haystack/defs/namespace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ impl<'a> Namespace<'a> {
785785
}
786786

787787
/// The defs for all of the core haystack value types.
788-
pub fn core_type_defs(&self) -> CoreTypeDefs {
788+
pub fn core_type_defs(&'_ self) -> CoreTypeDefs<'_> {
789789
CoreTypeDefs {
790790
marker: self.get_by_name("marker").unwrap_or(&EMPTY_DICT),
791791
na: self.get_by_name("na").unwrap_or(&EMPTY_DICT),

src/haystack/encoding/zinc/encode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub trait ToZinc {
2121
/// use libhaystack::encoding::zinc::encode::*;
2222
/// use libhaystack::units::get_unit_or_default;
2323
/// let val = Number::make_with_unit(100.0, get_unit_or_default("s"));
24-
/// assert_eq!(val.to_zinc_string(), Ok("100s".to_string()));
24+
/// assert_eq!(val.to_zinc_string(), Ok("100sec".to_string()));
2525
/// ```
2626
fn to_zinc_string(&self) -> Result<String> {
2727
let mut output = Vec::new();

src/haystack/filter/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Path {
3030
}
3131

3232
/// Obtain an `Id` iterator over `Path`s segments
33-
pub fn iter(&self) -> std::slice::Iter<Id> {
33+
pub fn iter(&'_ self) -> std::slice::Iter<'_, Id> {
3434
self.segments.iter()
3535
}
3636
}

0 commit comments

Comments
 (0)