-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Description
The new API for temporarily accessing the block device expects the given closure to return something of type T
:
/// Temporarily get access to the underlying block device.
pub fn device<F>(&self, f: F) -> T
where
F: FnOnce(&mut D) -> T,
{
let mut data = self.data.borrow_mut();
let result = f(data.block_cache.block_device());
result
}
I am pretty sure that T
in this case is supposed to be an arbitrary type. However, the VolumeManager::device
method does not declare T
, it reuses the type parameter from the struct definition, which is the time source. This makes it hard to actually use this method, since it is expecting to return an instance of the time source.
melvyn2
Metadata
Metadata
Assignees
Labels
No labels