Skip to content

Commit

Permalink
fix: use Result::map
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz committed Feb 1, 2022
1 parent 255d728 commit f898a5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/libs/windows/src/core/agile_reference.rs
Expand Up @@ -12,8 +12,7 @@ impl<T: Interface> AgileReference<T> {
where
&'a T: IntoParam<'a, IUnknown>,
{
let reference = unsafe { RoGetAgileReference(AGILEREFERENCE_DEFAULT, &T::IID, from_ref)? };
Ok(Self { reference, _marker: Default::default() })
unsafe { RoGetAgileReference(AGILEREFERENCE_DEFAULT, &T::IID, from_ref).map(|reference| Self { reference, _marker: Default::default() }) }
}

pub fn resolve(&self) -> Result<T> {
Expand Down

0 comments on commit f898a5a

Please sign in to comment.