Skip to content

Commit 7e5e217

Browse files
MorabbinCopilot
andcommitted
Remove Default derive from MemoryConfiguration
MemoryConfiguration exposes explicit enabled()/disabled() constructors, so a Default impl is redundant. SessionConfig and ResumeSessionConfig hold memory as Option<MemoryConfiguration>, which defaults to None without requiring MemoryConfiguration: Default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9659458 commit 7e5e217

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rust/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ impl InfiniteSessionConfig {
786786
/// The type is extensible: today it carries [`enabled`](Self::enabled), and
787787
/// further tuning knobs can be added as optional fields without a breaking
788788
/// change.
789-
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
789+
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
790790
#[serde(rename_all = "camelCase")]
791791
#[non_exhaustive]
792792
pub struct MemoryConfiguration {
@@ -4515,7 +4515,7 @@ mod tests {
45154515
fn memory_configuration_constructors_and_serde() {
45164516
assert!(MemoryConfiguration::enabled().enabled);
45174517
assert!(!MemoryConfiguration::disabled().enabled);
4518-
assert!(MemoryConfiguration::default().with_enabled(true).enabled);
4518+
assert!(MemoryConfiguration::disabled().with_enabled(true).enabled);
45194519

45204520
let json = serde_json::to_value(MemoryConfiguration::enabled()).unwrap();
45214521
assert_eq!(json, serde_json::json!({ "enabled": true }));

0 commit comments

Comments
 (0)