mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-19 11:06:17 +00:00
refactor: move HTTP range helper contracts (#3533)
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
use crate::bucket::error::BucketMetadataError;
|
||||
use crate::disk::error::DiskError;
|
||||
use rustfs_storage_api::StorageErrorCode;
|
||||
use rustfs_storage_api::{HTTPRangeError, StorageErrorCode};
|
||||
use rustfs_utils::path::decode_dir_object;
|
||||
use s3s::{S3Error, S3ErrorCode};
|
||||
|
||||
@@ -218,6 +218,14 @@ impl StorageError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<HTTPRangeError> for StorageError {
|
||||
fn from(err: HTTPRangeError) -> Self {
|
||||
match err {
|
||||
HTTPRangeError::InvalidRangeSpec(message) => Self::InvalidRangeSpec(message),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<DiskError> for StorageError {
|
||||
fn from(e: DiskError) -> Self {
|
||||
match e {
|
||||
|
||||
Reference in New Issue
Block a user