mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-31 09:18:28 +00:00
Merge branch 'main' of github.com:rustfs/s3-rustfs into feature/observability-metrics
# Conflicts: # ecstore/src/file_meta.rs # ecstore/src/set_disk.rs # ecstore/src/store_api.rs
This commit is contained in:
@@ -2175,7 +2175,6 @@ pub async fn read_xl_meta_no_data<R: AsyncRead + Unpin>(reader: &mut R, size: us
|
|||||||
}
|
}
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -6019,7 +6019,11 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_join_errs() {
|
fn test_join_errs() {
|
||||||
// Test joining error messages
|
// Test joining error messages
|
||||||
let errs = vec![None, Some(Error::from_string("error1")), Some(Error::from_string("error2"))];
|
let errs = vec![
|
||||||
|
None,
|
||||||
|
Some(Error::from_string("error1")),
|
||||||
|
Some(Error::from_string("error2")),
|
||||||
|
];
|
||||||
let joined = join_errs(&errs);
|
let joined = join_errs(&errs);
|
||||||
assert!(joined.contains("<nil>"));
|
assert!(joined.contains("<nil>"));
|
||||||
assert!(joined.contains("error1"));
|
assert!(joined.contains("error1"));
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ impl FileInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// to_part_offset 取offset 所在的part index, 返回part index, offset
|
// `to_part_offset` takes the `part index` where the `offset` is located, and returns `part index`, `offset`
|
||||||
pub fn to_part_offset(&self, offset: usize) -> Result<(usize, usize)> {
|
pub fn to_part_offset(&self, offset: usize) -> Result<(usize, usize)> {
|
||||||
if offset == 0 {
|
if offset == 0 {
|
||||||
return Ok((0, 0));
|
return Ok((0, 0));
|
||||||
|
|||||||
Reference in New Issue
Block a user