block: fix rustc migration error
This commit is contained in:
@@ -59,7 +59,8 @@ impl DeviceMapper {
|
||||
if !block_size.is_multiple_of(device.block_size()) {
|
||||
log::error!(
|
||||
"Couldn't create block mapper for {filesystem}: \
|
||||
cache block size is not a multiple of device block size"
|
||||
cache block size ({block_size}) is not a multiple of device block size ({})",
|
||||
device.block_size()
|
||||
);
|
||||
return Err(Error::InvalidArgument);
|
||||
}
|
||||
@@ -171,10 +172,11 @@ impl BlockCache {
|
||||
bucket_count: usize,
|
||||
filesystem: &str,
|
||||
) -> Result<Self, Error> {
|
||||
if block_size.is_multiple_of(device.block_size()) {
|
||||
if !block_size.is_multiple_of(device.block_size()) {
|
||||
log::error!(
|
||||
"Couldn't create block cache for {filesystem}: \
|
||||
cache block size is not a multiple of device block size"
|
||||
cache block size ({block_size}) is not a multiple of device block size ({})",
|
||||
device.block_size()
|
||||
);
|
||||
return Err(Error::InvalidArgument);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user