commit 8c59a057e69258169cf9633c19fb8dbc17ea4e13
parent 80a22209a357abf6c31ecd405e68ab1ddd8eaeaa
Author: triesap <tyson@radroots.org>
Date: Sat, 18 Jul 2026 06:28:32 +0000
runtime: qualify Phase 1 public closure
- align logging options with bounded shared defaults.
- preserve product fixture semantics while clearing Rust 1.97 lints.
- refresh the governed dependency lock for radroots_log.
- verify all workspace targets with locked checks and tests.
Diffstat:
8 files changed, 288 insertions(+), 222 deletions(-)
diff --git a/core/crates/tera_core/build.rs b/core/crates/tera_core/build.rs
@@ -10,30 +10,28 @@ fn main() {
println!("cargo:rerun-if-env-changed=PROFILE");
let rustc = env::var("RUSTC").expect("missing required env var RUSTC");
- if let Ok(out) = Command::new(rustc).arg("--version").output() {
- if out.status.success() {
- if let Ok(ver) = String::from_utf8(out.stdout) {
- println!("cargo:rustc-env=RUSTC_VERSION={}", ver.trim());
- }
- }
+ if let Ok(out) = Command::new(rustc).arg("--version").output()
+ && out.status.success()
+ && let Ok(ver) = String::from_utf8(out.stdout)
+ {
+ println!("cargo:rustc-env=RUSTC_VERSION={}", ver.trim());
}
if let Ok(out) = Command::new("git")
.args(["rev-parse", "--short=12", "HEAD"])
.output()
+ && out.status.success()
{
- if out.status.success() {
- let mut sha = String::from_utf8_lossy(&out.stdout).trim().to_string();
- let dirty = Command::new("git")
- .args(["status", "--porcelain"])
- .output()
- .ok()
- .map_or(false, |o| o.status.success() && !o.stdout.is_empty());
- if dirty {
- sha.push_str("-dirty");
- }
- println!("cargo:rustc-env=GIT_HASH={sha}");
+ let mut sha = String::from_utf8_lossy(&out.stdout).trim().to_string();
+ let dirty = Command::new("git")
+ .args(["status", "--porcelain"])
+ .output()
+ .ok()
+ .is_some_and(|output| output.status.success() && !output.stdout.is_empty());
+ if dirty {
+ sha.push_str("-dirty");
}
+ println!("cargo:rustc-env=GIT_HASH={sha}");
}
let profile = env::var("PROFILE").expect("missing required env var PROFILE");
diff --git a/core/crates/tera_core/src/logging.rs b/core/crates/tera_core/src/logging.rs
@@ -6,19 +6,27 @@ pub fn init_logging(
file_name: Option<String>,
is_stdout: Option<bool>,
) -> Result<(), crate::RadrootsAppError> {
- let opts = radroots_log::LoggingOptions {
- dir: dir.map(PathBuf::from),
- file_name: file_name.unwrap_or_else(|| "radroots.log".to_string()),
- file_layout: radroots_log::LogFileLayout::PrefixedDate,
- stdout: is_stdout.unwrap_or(true),
- default_level: None,
- };
+ let opts = logging_options(dir, file_name, is_stdout);
match radroots_log::init_logging(opts) {
Ok(()) => Ok(()),
Err(err) => Err(crate::RadrootsAppError::initialization(format!("{err}"))),
}
}
+fn logging_options(
+ dir: Option<String>,
+ file_name: Option<String>,
+ is_stdout: Option<bool>,
+) -> radroots_log::LoggingOptions {
+ radroots_log::LoggingOptions {
+ dir: dir.map(PathBuf::from),
+ file_name: file_name.unwrap_or_else(|| "radroots.log".to_string()),
+ file_layout: radroots_log::LogFileLayout::StableFileName,
+ stdout: is_stdout.unwrap_or(true),
+ ..radroots_log::LoggingOptions::default()
+ }
+}
+
#[cfg_attr(not(coverage_nightly), uniffi::export)]
pub fn init_logging_stdout() -> Result<(), crate::RadrootsAppError> {
match radroots_log::init_stdout() {
@@ -44,3 +52,44 @@ pub fn log_debug(msg: String) -> Result<(), crate::RadrootsAppError> {
radroots_log::log_debug(msg);
Ok(())
}
+
+#[cfg(test)]
+mod tests {
+ use super::logging_options;
+ use radroots_log::{LogFileLayout, LogFormat, LogRotation, LoggingOptions};
+ use std::path::PathBuf;
+
+ #[test]
+ fn logging_options_adopt_bounded_library_defaults() {
+ let options = logging_options(
+ Some("logs".to_owned()),
+ Some("mobile.log".to_owned()),
+ Some(false),
+ );
+
+ assert_eq!(options.dir, Some(PathBuf::from("logs")));
+ assert_eq!(options.file_name, "mobile.log");
+ assert_eq!(options.file_layout, LogFileLayout::StableFileName);
+ assert!(!options.stdout);
+ assert!(!options.stderr);
+ assert_eq!(options.format, LogFormat::Compact);
+ assert_eq!(options.identity, None);
+ assert_eq!(options.rotation, LogRotation::default());
+ assert_eq!(options.default_level, None);
+ }
+
+ #[test]
+ fn logging_options_preserve_public_api_defaults() {
+ let options = logging_options(None, None, None);
+
+ assert_eq!(options.file_name, "radroots.log");
+ assert!(options.stdout);
+ assert_eq!(
+ options,
+ LoggingOptions {
+ file_layout: LogFileLayout::StableFileName,
+ ..LoggingOptions::default()
+ }
+ );
+ }
+}
diff --git a/core/crates/tera_core/src/runtime/builder.rs b/core/crates/tera_core/src/runtime/builder.rs
@@ -9,6 +9,12 @@ pub struct RuntimeBuilder {
manage_runtime: bool,
}
+impl Default for RuntimeBuilder {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
impl RuntimeBuilder {
pub fn new() -> Self {
Self {
diff --git a/core/crates/tera_core/src/runtime/key_management.rs b/core/crates/tera_core/src/runtime/key_management.rs
@@ -158,7 +158,7 @@ impl RadrootsRuntime {
.accounts
.list_accounts()
.map_err(|e| RadrootsAppError::identity(format!("{e}")))?;
- return Ok(accounts
+ Ok(accounts
.into_iter()
.map(|account| {
let is_selected = selected_identity_id
@@ -173,7 +173,7 @@ impl RadrootsRuntime {
is_selected,
}
})
- .collect());
+ .collect())
}
#[cfg(not(feature = "nostr-client"))]
{
@@ -230,12 +230,12 @@ impl RadrootsRuntime {
}
})
.collect();
- return Ok(NostrIdentitySnapshot {
+ Ok(NostrIdentitySnapshot {
has_selected_signing_identity,
selected_identity_id: selected_identity_id.map(|id| id.to_string()),
selected_npub,
identities,
- });
+ })
}
#[cfg(not(feature = "nostr-client"))]
{
@@ -249,8 +249,7 @@ impl RadrootsRuntime {
) -> Result<NostrHostCustodyIdentity, RadrootsAppError> {
#[cfg(feature = "nostr-client")]
{
- return host_custody_identity_from_secret(secret_key.as_str())
- .map(|(_, identity)| identity);
+ host_custody_identity_from_secret(secret_key.as_str()).map(|(_, identity)| identity)
}
#[cfg(not(feature = "nostr-client"))]
{
@@ -272,7 +271,7 @@ impl RadrootsRuntime {
Err(err) => return Err(RadrootsAppError::runtime(format!("{err}"))),
};
let (identity, _) = host_custody_identity_from_secret(secret_key.as_str())?;
- return restore_host_custody_identity(&mut guard, &identity, label, make_selected);
+ restore_host_custody_identity(&mut guard, &identity, label, make_selected)
}
#[cfg(not(feature = "nostr-client"))]
{
diff --git a/core/crates/tera_core/src/runtime/mod.rs b/core/crates/tera_core/src/runtime/mod.rs
@@ -115,10 +115,10 @@ impl RadrootsRuntime {
pub fn info_json(&self) -> String {
#[cfg(feature = "rt")]
{
- return match serde_json::to_string_pretty(&self.info()) {
+ match serde_json::to_string_pretty(&self.info()) {
Ok(json) => json,
Err(err) => format!(r#"{{"error":"serialize RuntimeInfo: {err}"}}"#),
- };
+ }
}
#[cfg(not(feature = "rt"))]
{
diff --git a/core/crates/tera_core/src/runtime/nostr.rs b/core/crates/tera_core/src/runtime/nostr.rs
@@ -83,7 +83,7 @@ fn map_post_event_metadata(
NostrPostEventMetadata {
id: event.id,
author: event.author,
- published_at: event.published_at as u64,
+ published_at: event.published_at,
post: NostrPost {
content: event.data.content,
},
@@ -99,12 +99,12 @@ fn map_profile_event_metadata(
NostrProfileEventMetadata {
id: event.id,
author: event.author,
- published_at: event.published_at as u64,
+ published_at: event.published_at,
profile: NostrProfile {
name: event.data.profile.name.into(),
- display_name: event.data.profile.display_name.into(),
- nip05: event.data.profile.nip05.into(),
- about: event.data.profile.about.into(),
+ display_name: event.data.profile.display_name,
+ nip05: event.data.profile.nip05,
+ about: event.data.profile.about,
website: event.data.profile.website,
picture: event.data.profile.picture,
banner: event.data.profile.banner,
@@ -156,20 +156,20 @@ impl RadrootsRuntime {
#[cfg(feature = "nostr-client")]
{
let guard = self.net.lock();
- if let Ok(g) = guard {
- if let Some(s) = g.nostr_connection_snapshot() {
- let light = match s.light {
- radroots_net_core::nostr_client::Light::Green => NostrLight::Green,
- radroots_net_core::nostr_client::Light::Yellow => NostrLight::Yellow,
- radroots_net_core::nostr_client::Light::Red => NostrLight::Red,
- };
- return NostrConnectionStatus {
- light,
- connected: s.connected as u32,
- connecting: s.connecting as u32,
- last_error: s.last_error,
- };
- }
+ if let Ok(g) = guard
+ && let Some(s) = g.nostr_connection_snapshot()
+ {
+ let light = match s.light {
+ radroots_net_core::nostr_client::Light::Green => NostrLight::Green,
+ radroots_net_core::nostr_client::Light::Yellow => NostrLight::Yellow,
+ radroots_net_core::nostr_client::Light::Red => NostrLight::Red,
+ };
+ return NostrConnectionStatus {
+ light,
+ connected: s.connected as u32,
+ connecting: s.connecting as u32,
+ last_error: s.last_error,
+ };
}
NostrConnectionStatus {
light: NostrLight::Red,
@@ -313,10 +313,10 @@ impl RadrootsRuntime {
{
let mgr = nostr_manager(self)?;
mgr.start_post_event_stream(since_unix);
- if let Ok(mut rx_guard) = self.post_events_rx.lock() {
- if rx_guard.is_none() {
- *rx_guard = Some(mgr.subscribe_post_events());
- }
+ if let Ok(mut rx_guard) = self.post_events_rx.lock()
+ && rx_guard.is_none()
+ {
+ *rx_guard = Some(mgr.subscribe_post_events());
}
Ok(())
}
diff --git a/core/crates/tera_core/src/runtime/product_surface.rs b/core/crates/tera_core/src/runtime/product_surface.rs
@@ -1097,7 +1097,7 @@ pub fn fixture_today_cards(context_id: Option<String>) -> Vec<TodayCard> {
TODAY_CARD_RANKING_PRIORITY
.into_iter()
.enumerate()
- .filter_map(|(index, card_type)| {
+ .map(|(index, card_type)| {
let context = filter_context
.clone()
.unwrap_or_else(|| contexts[index % contexts.len()].clone());
@@ -1105,7 +1105,7 @@ pub fn fixture_today_cards(context_id: Option<String>) -> Vec<TodayCard> {
let object_id = format!("phase1_{:?}_001", object_kind).to_lowercase();
let object = object_ref(object_kind, object_id, format!("{:?} fixture", card_type));
let action_type = card_action_for(card_type);
- Some(TodayCard {
+ TodayCard {
id: format!("today_{:?}_001", card_type).to_lowercase(),
card_type,
source_object_refs: vec![object.clone()],
@@ -1144,7 +1144,7 @@ pub fn fixture_today_cards(context_id: Option<String>) -> Vec<TodayCard> {
},
is_stale: matches!(card_type, TodayCardType::Proof),
is_offline: matches!(card_type, TodayCardType::SyncOutbox),
- })
+ }
})
.collect()
}
@@ -1356,9 +1356,9 @@ pub fn fixture_search_results(
.collect()
}
-fn prototype_path_step(
- id: impl Into<String>,
- label: impl Into<String>,
+struct PrototypePathStepFixture {
+ id: &'static str,
+ label: &'static str,
context: ActiveContext,
action_type: Option<AddActionType>,
object_ref: Option<ObjectRef>,
@@ -1367,10 +1367,24 @@ fn prototype_path_step(
visibility: VisibilityClass,
outbox_state: OutboxState,
sync_state: SyncState,
-) -> PrototypePathStep {
+}
+
+fn prototype_path_step(fixture: PrototypePathStepFixture) -> PrototypePathStep {
+ let PrototypePathStepFixture {
+ id,
+ label,
+ context,
+ action_type,
+ object_ref,
+ domain,
+ action,
+ visibility,
+ outbox_state,
+ sync_state,
+ } = fixture;
PrototypePathStep {
- id: id.into(),
- label: label.into(),
+ id: id.to_string(),
+ label: label.to_string(),
context: context.clone(),
action_type,
object_ref,
@@ -1411,66 +1425,66 @@ pub fn fixture_prototype_paths() -> Vec<PrototypePath> {
actor: farm.actor,
context: farm.clone(),
steps: vec![
- prototype_path_step(
- "producer_today",
- "Farm Today",
- farm.clone(),
- None,
- Some(farm.context_ref.clone()),
- AuthorityDomain::FarmWorkspaceOperations,
- AuthorityAction::Search,
- farm.visibility_scope,
- OutboxState::NotQueued,
- SyncState::Online,
- ),
- prototype_path_step(
- "producer_add_food",
- "Add Food",
- farm.clone(),
- Some(AddActionType::Food),
- Some(food_ref.clone()),
- AuthorityDomain::FarmWorkspaceOperations,
- AuthorityAction::Submit,
- VisibilityClass::NetworkVisible,
- OutboxState::Draft,
- SyncState::Offline,
- ),
- prototype_path_step(
- "producer_add_to_route",
- "Add to Route",
- farm.clone(),
- Some(AddActionType::RouteNeed),
- Some(route_ref.clone()),
- AuthorityDomain::FarmWorkspaceOperations,
- AuthorityAction::Share,
- VisibilityClass::RouteScoped,
- OutboxState::Queued,
- SyncState::Syncing,
- ),
- prototype_path_step(
- "producer_food_page",
- "Food page",
- farm.clone(),
- None,
- Some(food_ref.clone()),
- AuthorityDomain::FarmWorkspaceOperations,
- AuthorityAction::NavigateRelatedObject,
- VisibilityClass::NetworkVisible,
- OutboxState::Shared,
- SyncState::Synced,
- ),
- prototype_path_step(
- "producer_route_page",
- "Route page",
- route.clone(),
- None,
- Some(route_ref.clone()),
- AuthorityDomain::RouteCoordination,
- AuthorityAction::NavigateRelatedObject,
- VisibilityClass::RouteScoped,
- OutboxState::NotQueued,
- SyncState::Online,
- ),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "producer_today",
+ label: "Farm Today",
+ context: farm.clone(),
+ action_type: None,
+ object_ref: Some(farm.context_ref.clone()),
+ domain: AuthorityDomain::FarmWorkspaceOperations,
+ action: AuthorityAction::Search,
+ visibility: farm.visibility_scope,
+ outbox_state: OutboxState::NotQueued,
+ sync_state: SyncState::Online,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "producer_add_food",
+ label: "Add Food",
+ context: farm.clone(),
+ action_type: Some(AddActionType::Food),
+ object_ref: Some(food_ref.clone()),
+ domain: AuthorityDomain::FarmWorkspaceOperations,
+ action: AuthorityAction::Submit,
+ visibility: VisibilityClass::NetworkVisible,
+ outbox_state: OutboxState::Draft,
+ sync_state: SyncState::Offline,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "producer_add_to_route",
+ label: "Add to Route",
+ context: farm.clone(),
+ action_type: Some(AddActionType::RouteNeed),
+ object_ref: Some(route_ref.clone()),
+ domain: AuthorityDomain::FarmWorkspaceOperations,
+ action: AuthorityAction::Share,
+ visibility: VisibilityClass::RouteScoped,
+ outbox_state: OutboxState::Queued,
+ sync_state: SyncState::Syncing,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "producer_food_page",
+ label: "Food page",
+ context: farm.clone(),
+ action_type: None,
+ object_ref: Some(food_ref.clone()),
+ domain: AuthorityDomain::FarmWorkspaceOperations,
+ action: AuthorityAction::NavigateRelatedObject,
+ visibility: VisibilityClass::NetworkVisible,
+ outbox_state: OutboxState::Shared,
+ sync_state: SyncState::Synced,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "producer_route_page",
+ label: "Route page",
+ context: route.clone(),
+ action_type: None,
+ object_ref: Some(route_ref.clone()),
+ domain: AuthorityDomain::RouteCoordination,
+ action: AuthorityAction::NavigateRelatedObject,
+ visibility: VisibilityClass::RouteScoped,
+ outbox_state: OutboxState::NotQueued,
+ sync_state: SyncState::Online,
+ }),
],
},
PrototypePath {
@@ -1480,54 +1494,54 @@ pub fn fixture_prototype_paths() -> Vec<PrototypePath> {
actor: buyer.actor,
context: buyer.clone(),
steps: vec![
- prototype_path_step(
- "buyer_today",
- "Buyer Today",
- buyer.clone(),
- None,
- Some(buyer.context_ref.clone()),
- AuthorityDomain::BuyerWorkspace,
- AuthorityAction::Search,
- buyer.visibility_scope,
- OutboxState::NotQueued,
- SyncState::Online,
- ),
- prototype_path_step(
- "buyer_request",
- "Add Buyer Request",
- buyer.clone(),
- Some(AddActionType::BuyerRequest),
- Some(buyer_request_ref.clone()),
- AuthorityDomain::BuyerWorkspace,
- AuthorityAction::Submit,
- VisibilityClass::BuyerScoped,
- OutboxState::Draft,
- SyncState::Offline,
- ),
- prototype_path_step(
- "buyer_commitment",
- "Confirm Commitment",
- buyer.clone(),
- Some(AddActionType::BuyerCommitment),
- Some(buyer_request_ref),
- AuthorityDomain::BuyerWorkspace,
- AuthorityAction::Approve,
- VisibilityClass::BuyerScoped,
- OutboxState::Queued,
- SyncState::Syncing,
- ),
- prototype_path_step(
- "buyer_route",
- "Route",
- route.clone(),
- None,
- Some(route_ref.clone()),
- AuthorityDomain::RouteCoordination,
- AuthorityAction::NavigateRelatedObject,
- VisibilityClass::RouteScoped,
- OutboxState::Shared,
- SyncState::Synced,
- ),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "buyer_today",
+ label: "Buyer Today",
+ context: buyer.clone(),
+ action_type: None,
+ object_ref: Some(buyer.context_ref.clone()),
+ domain: AuthorityDomain::BuyerWorkspace,
+ action: AuthorityAction::Search,
+ visibility: buyer.visibility_scope,
+ outbox_state: OutboxState::NotQueued,
+ sync_state: SyncState::Online,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "buyer_request",
+ label: "Add Buyer Request",
+ context: buyer.clone(),
+ action_type: Some(AddActionType::BuyerRequest),
+ object_ref: Some(buyer_request_ref.clone()),
+ domain: AuthorityDomain::BuyerWorkspace,
+ action: AuthorityAction::Submit,
+ visibility: VisibilityClass::BuyerScoped,
+ outbox_state: OutboxState::Draft,
+ sync_state: SyncState::Offline,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "buyer_commitment",
+ label: "Confirm Commitment",
+ context: buyer.clone(),
+ action_type: Some(AddActionType::BuyerCommitment),
+ object_ref: Some(buyer_request_ref),
+ domain: AuthorityDomain::BuyerWorkspace,
+ action: AuthorityAction::Approve,
+ visibility: VisibilityClass::BuyerScoped,
+ outbox_state: OutboxState::Queued,
+ sync_state: SyncState::Syncing,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "buyer_route",
+ label: "Route",
+ context: route.clone(),
+ action_type: None,
+ object_ref: Some(route_ref.clone()),
+ domain: AuthorityDomain::RouteCoordination,
+ action: AuthorityAction::NavigateRelatedObject,
+ visibility: VisibilityClass::RouteScoped,
+ outbox_state: OutboxState::Shared,
+ sync_state: SyncState::Synced,
+ }),
],
},
PrototypePath {
@@ -1537,54 +1551,54 @@ pub fn fixture_prototype_paths() -> Vec<PrototypePath> {
actor: route.actor,
context: route.clone(),
steps: vec![
- prototype_path_step(
- "route_today",
- "Route Today",
- route.clone(),
- None,
- Some(route_ref.clone()),
- AuthorityDomain::RouteCoordination,
- AuthorityAction::Search,
- VisibilityClass::RouteScoped,
- OutboxState::NotQueued,
- SyncState::Online,
- ),
- prototype_path_step(
- "route_page",
- "Route page",
- route.clone(),
- None,
- Some(route_ref),
- AuthorityDomain::RouteCoordination,
- AuthorityAction::NavigateRelatedObject,
- VisibilityClass::RouteScoped,
- OutboxState::NotQueued,
- SyncState::Online,
- ),
- prototype_path_step(
- "route_resolve_blocker",
- "Resolve blocker",
- route.clone(),
- Some(AddActionType::Exception),
- Some(exception_ref),
- AuthorityDomain::RouteCoordination,
- AuthorityAction::Close,
- VisibilityClass::RouteScoped,
- OutboxState::Conflict,
- SyncState::Failed,
- ),
- prototype_path_step(
- "route_assign_partner",
- "Assign RoutePartner",
- route,
- Some(AddActionType::RouteNeed),
- Some(route_partner.context_ref.clone()),
- AuthorityDomain::RouteCoordination,
- AuthorityAction::Assign,
- VisibilityClass::RouteScoped,
- OutboxState::Queued,
- SyncState::Syncing,
- ),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "route_today",
+ label: "Route Today",
+ context: route.clone(),
+ action_type: None,
+ object_ref: Some(route_ref.clone()),
+ domain: AuthorityDomain::RouteCoordination,
+ action: AuthorityAction::Search,
+ visibility: VisibilityClass::RouteScoped,
+ outbox_state: OutboxState::NotQueued,
+ sync_state: SyncState::Online,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "route_page",
+ label: "Route page",
+ context: route.clone(),
+ action_type: None,
+ object_ref: Some(route_ref),
+ domain: AuthorityDomain::RouteCoordination,
+ action: AuthorityAction::NavigateRelatedObject,
+ visibility: VisibilityClass::RouteScoped,
+ outbox_state: OutboxState::NotQueued,
+ sync_state: SyncState::Online,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "route_resolve_blocker",
+ label: "Resolve blocker",
+ context: route.clone(),
+ action_type: Some(AddActionType::Exception),
+ object_ref: Some(exception_ref),
+ domain: AuthorityDomain::RouteCoordination,
+ action: AuthorityAction::Close,
+ visibility: VisibilityClass::RouteScoped,
+ outbox_state: OutboxState::Conflict,
+ sync_state: SyncState::Failed,
+ }),
+ prototype_path_step(PrototypePathStepFixture {
+ id: "route_assign_partner",
+ label: "Assign RoutePartner",
+ context: route,
+ action_type: Some(AddActionType::RouteNeed),
+ object_ref: Some(route_partner.context_ref.clone()),
+ domain: AuthorityDomain::RouteCoordination,
+ action: AuthorityAction::Assign,
+ visibility: VisibilityClass::RouteScoped,
+ outbox_state: OutboxState::Queued,
+ sync_state: SyncState::Syncing,
+ }),
],
},
]
diff --git a/core/crates/tera_core/src/runtime/trade_listing.rs b/core/crates/tera_core/src/runtime/trade_listing.rs
@@ -175,7 +175,7 @@ impl RadrootsRuntime {
out.push(listing_summary_from_trade(listing, &event));
}
}
- out.sort_by(|left, right| right.published_at.cmp(&left.published_at));
+ out.sort_by_key(|listing| std::cmp::Reverse(listing.published_at));
Ok(out)
}
#[cfg(not(feature = "nostr-client"))]