Skip to content

Commit 719b29d

Browse files
committed
fix: use derive(Default) for Scope enum
1 parent 53afe73 commit 719b29d

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

crates/icm-core/src/memory.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,18 @@ impl Memory {
5353
}
5454

5555
/// Memory scope for cloud sync.
56-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
56+
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
5757
#[serde(rename_all = "lowercase")]
5858
pub enum Scope {
5959
/// Personal memories (local only, default).
60+
#[default]
6061
User,
6162
/// Shared within a project (synced to cloud).
6263
Project,
6364
/// Shared across the entire organization (synced to cloud).
6465
Org,
6566
}
6667

67-
impl Default for Scope {
68-
fn default() -> Self {
69-
Self::User
70-
}
71-
}
72-
7368
impl fmt::Display for Scope {
7469
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7570
match self {

0 commit comments

Comments
 (0)