Skip to content

Commit

Permalink
chore: remove unnecessary type inference
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Aug 13, 2024
1 parent 7ab2b34 commit 5ba9faf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions move/operators/sources/operators.move
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ module operators::operators {
assert!(self.caps.contains(cap_id), ECapNotFound);

// Remove the capability from the `Operators` struct to loan it out
let cap = self.caps.remove<ID, T>(cap_id);
let cap = self.caps.remove(cap_id);

// Create a new `Referent` to store the loaned capability
let mut referent = borrow::new<T>(cap, ctx);
let mut referent = borrow::new(cap, ctx);

// Borrow the T capability and a Borrow hot potato object from the `Referent`
let (loaned_cap, borrow_obj) = borrow::borrow<T>(&mut referent);
let (loaned_cap, borrow_obj) = borrow::borrow(&mut referent);

// Store the `Referent` in the `Operators` struct
self.loaned_caps.add(cap_id, referent);
Expand Down

0 comments on commit 5ba9faf

Please sign in to comment.