Skip to content

Commit

Permalink
stock collections
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Nov 10, 2023
1 parent 554c48b commit 6e47f5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ where
V::from_default(value)
}
fn Size(&self) -> ::windows_core::Result<u32> {
Ok(self.map.len() as u32)
Ok(self.map.len().try_into()?)
}
fn HasKey(&self, key: &K::Default) -> ::windows_core::Result<bool> {
Ok(self.map.contains_key(key))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ where
T::from_default(item)
}
fn Size(&self) -> ::windows_core::Result<u32> {
Ok(self.values.len() as u32)
Ok(self.values.len().try_into()?)
}
fn IndexOf(&self, value: &T::Default, result: &mut u32) -> ::windows_core::Result<bool> {
match self.values.iter().position(|element| element == value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ where
V::from_default(value)
}
fn Size(&self) -> ::windows_core::Result<u32> {
Ok(self.map.len() as u32)
Ok(self.map.len().try_into()?)
}
fn HasKey(&self, key: &K::Default) -> ::windows_core::Result<bool> {
Ok(self.map.contains_key(key))
Expand Down Expand Up @@ -981,7 +981,7 @@ where
T::from_default(item)
}
fn Size(&self) -> ::windows_core::Result<u32> {
Ok(self.values.len() as u32)
Ok(self.values.len().try_into()?)
}
fn IndexOf(&self, value: &T::Default, result: &mut u32) -> ::windows_core::Result<bool> {
match self.values.iter().position(|element| element == value) {
Expand Down

0 comments on commit 6e47f5d

Please sign in to comment.