Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/fakecloud-s3/src/service/annotations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ fn resolve_object_mut<'a>(
o.version_id.as_deref() == Some(vid.as_str())
}
};
if b.objects.get(key).is_some_and(&matches) {
if b.objects.get(key).is_some_and(matches) {
return b.objects.get_mut(key).ok_or_else(|| no_such_key(key));
}
b.object_versions
Expand Down
4 changes: 4 additions & 0 deletions crates/fakecloud-s3/src/service/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ static SEQUENCER: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::n
pub(crate) fn next_sequencer() -> String {
use std::sync::atomic::Ordering;
let now = Utc::now().timestamp_micros().max(0) as u64;
// `fetch_update` is deprecated in favour of `try_update` from Rust 1.99,
// which is newer than the workspace's `rust-version`. Switch once the
// MSRV reaches 1.99.
#[allow(deprecated)]
let prev = SEQUENCER
.fetch_update(Ordering::SeqCst, Ordering::SeqCst, |prev| {
Some(now.max(prev.saturating_add(1)))
Expand Down
6 changes: 3 additions & 3 deletions crates/fakecloud-ses/src/service/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ pub fn render_template(template: &EmailTemplate, template_data_str: &str) -> Ren
result
};
RenderedTemplate {
subject: template.subject.as_deref().map(&substitute),
html: template.html_body.as_deref().map(&substitute),
text: template.text_body.as_deref().map(&substitute),
subject: template.subject.as_deref().map(substitute),
html: template.html_body.as_deref().map(substitute),
text: template.text_body.as_deref().map(substitute),
}
}
Loading