chore: fix typos in rust code comment or error message

This commit is contained in:
Gwen Lg
2026-01-27 17:11:31 +01:00
parent 4650fbd49c
commit e331f88c85
16 changed files with 27 additions and 27 deletions
+1 -1
View File
@@ -378,7 +378,7 @@ pub async fn handle_get_without_ctx(
pub(crate) fn check_version_not_deleted(version: &Version) -> Result<(), Error> {
if version.deleted.get() {
// the version was deleted between when the object_table was consulted
// and now, this could mean the object was deleted, or overriden.
// and now, this could mean the object was deleted, or overridden.
// Rather than say the key doesn't exist, return a transient error
// to signal the client to try again.
return Err(CommonError::InternalError(UtilError::Message(
+2 -2
View File
@@ -355,7 +355,7 @@ impl Endpoint {
if let Some(x_id) = query.x_id.take() {
if x_id != res.name() {
// I think AWS ignores the x-id parameter.
// Let's make this at least be a warnin to help debugging.
// Let's make this at least be a warning to help debugging.
warn!(
"x-id ({}) does not match parsed endpoint ({})",
x_id,
@@ -949,7 +949,7 @@ mod tests {
GET "/?uploads&delimiter=/&prefix=photos/2006/" => ListMultipartUploads
GET "/?uploads&delimiter=D&encoding-type=EncodingType&key-marker=KeyMarker&max-uploads=1&prefix=Prefix&upload-id-marker=UploadIdMarker" => ListMultipartUploads
GET "/" => ListObjects
GET "/?prefix=N&marker=Ned&max-keys=40" => ListObjects
GET "/?prefix=N&marker=Need&max-keys=40" => ListObjects
GET "/?delimiter=/" => ListObjects
GET "/?prefix=photos/2006/&delimiter=/" => ListObjects
+3 -3
View File
@@ -213,7 +213,7 @@ impl WebsiteConfiguration {
}
if self.routing_rules.rules.len() > 1000 {
// we will do linear scans, best to avoid overly long configuration. The
// limit was choosen arbitrarily
// limit was chosen arbitrarily
return Err(Error::bad_request(
"Bad XML: RoutingRules can't have more than 1000 child elements",
));
@@ -225,7 +225,7 @@ impl WebsiteConfiguration {
pub fn into_garage_website_config(self) -> Result<WebsiteConfig, Error> {
if self.redirect_all_requests_to.is_some() {
Err(Error::NotImplemented(
"RedirectAllRequestsTo is not currently implemented in Garage, however its effect can be emulated using a single inconditional RoutingRule.".into(),
"RedirectAllRequestsTo is not currently implemented in Garage, however its effect can be emulated using a single unconditional RoutingRule.".into(),
))
} else {
Ok(WebsiteConfig {
@@ -251,7 +251,7 @@ impl WebsiteConfiguration {
hostname: rule.redirect.hostname.map(|h| h.0),
protocol: rule.redirect.protocol.map(|p| p.0),
// aws default to 301, which i find punitive in case of
// missconfiguration (can be permanently cached on the
// misconfiguration (can be permanently cached on the
// user agent)
http_redirect_code: rule
.redirect