nostr-rs-relay

My dev fork of nostr-rs-relay
git clone git://jb55.com/nostr-rs-relay
Log | Files | Refs | README | LICENSE

commit 3302fb2e81c5a31d2fe65d8f337ed248ca2859ee
parent f415295184ee748d0668e984a5827f4e2e74ff7e
Author: Greg Heartsfield <scsibug@imap.cc>
Date:   Wed, 29 Dec 2021 22:49:46 -0600

refactor: clippy suggestions

Diffstat:
Msrc/event.rs | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/event.rs b/src/event.rs @@ -78,8 +78,7 @@ impl Event { // don't bother to validate an event with a timestamp in the distant future. let config = config::SETTINGS.read().unwrap(); let max_future_sec = config.options.reject_future_seconds; - if max_future_sec.is_some() { - let allowable_future = max_future_sec.unwrap(); + if let Some(allowable_future) = max_future_sec { let curr_time = unix_time(); // calculate difference, plus how far future we allow if curr_time + (allowable_future as u64) < self.created_at {