Remove Deref{,Mut} on FileLockEntryHandle to make code more explicit
This commit is contained in:
parent
439326e1b6
commit
54deef3dde
2 changed files with 3 additions and 17 deletions
|
@ -54,20 +54,6 @@ impl FileLockEntryHandle {
|
|||
}
|
||||
}
|
||||
|
||||
impl Deref for FileLockEntryHandle {
|
||||
type Target = StoreId;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.1
|
||||
}
|
||||
}
|
||||
|
||||
impl DerefMut for FileLockEntryHandle {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.1
|
||||
}
|
||||
}
|
||||
|
||||
wrappable_struct!(FileLockEntryHandle, FileLockEntryWrapper, FLE_WRAPPER);
|
||||
class!(RFileLockEntry);
|
||||
impl_unwrap!(RFileLockEntry, FileLockEntryHandle, FLE_WRAPPER);
|
||||
|
|
|
@ -268,7 +268,7 @@ methods!(
|
|||
// On error: Nil + Exception
|
||||
//
|
||||
fn update(fle: RFileLockEntry) -> NilClass {
|
||||
let fle = typecheck!(fle).unwrap().clone();
|
||||
let fle = typecheck!(fle).unwrap().fle_handle().clone();
|
||||
|
||||
call_on_store! {
|
||||
store <- itself wrapped inside STORE_WRAPPER,
|
||||
|
@ -315,7 +315,7 @@ methods!(
|
|||
// On error: Nil + Exception
|
||||
//
|
||||
fn save_to(fle: RFileLockEntry, sid: RStoreId) -> NilClass {
|
||||
let fle = typecheck!(fle).unwrap().clone();
|
||||
let fle = typecheck!(fle).unwrap().fle_handle().clone();
|
||||
let sid = typecheck!(sid).unwrap().clone();
|
||||
|
||||
call_on_store! {
|
||||
|
@ -340,7 +340,7 @@ methods!(
|
|||
// On error: Nil + Exception
|
||||
//
|
||||
fn save_as(fle: RFileLockEntry, sid: RStoreId) -> NilClass {
|
||||
let fle = typecheck!(fle).unwrap().clone();
|
||||
let fle = typecheck!(fle).unwrap().fle_handle().clone();
|
||||
let sid = typecheck!(sid).unwrap().clone();
|
||||
|
||||
call_on_store! {
|
||||
|
|
Loading…
Reference in a new issue