Skip to content

Commit 72f8ccc

Browse files
committed
Cleanup
1 parent aba7477 commit 72f8ccc

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/bin/generate.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,11 +1064,8 @@ starting with '$/' it is free to ignore the notification."
10641064
match method_name {
10651065
"initialize" => self.agent.get("InitializeRequest").unwrap(),
10661066
"authenticate" => self.agent.get("AuthenticateRequest").unwrap(),
1067-
#[cfg(feature = "unstable_llm_providers")]
10681067
"providers/list" => self.agent.get("ListProvidersRequest").unwrap(),
1069-
#[cfg(feature = "unstable_llm_providers")]
10701068
"providers/set" => self.agent.get("SetProvidersRequest").unwrap(),
1071-
#[cfg(feature = "unstable_llm_providers")]
10721069
"providers/disable" => self.agent.get("DisableProvidersRequest").unwrap(),
10731070
"session/new" => self.agent.get("NewSessionRequest").unwrap(),
10741071
"session/load" => self.agent.get("LoadSessionRequest").unwrap(),
@@ -1111,9 +1108,7 @@ starting with '$/' it is free to ignore the notification."
11111108
"terminal/release" => self.client.get("ReleaseTerminalRequest").unwrap(),
11121109
"terminal/wait_for_exit" => self.client.get("WaitForTerminalExitRequest").unwrap(),
11131110
"terminal/kill" => self.client.get("KillTerminalRequest").unwrap(),
1114-
#[cfg(feature = "unstable_elicitation")]
11151111
"elicitation/create" => self.client.get("CreateElicitationRequest").unwrap(),
1116-
#[cfg(feature = "unstable_elicitation")]
11171112
"elicitation/complete" => {
11181113
self.client.get("CompleteElicitationNotification").unwrap()
11191114
}

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ mod ext;
6060
mod maybe_undefined;
6161
#[cfg(feature = "unstable_nes")]
6262
mod nes;
63+
#[cfg(feature = "unstable_llm_providers")]
6364
mod nullable;
6465
mod plan;
6566
#[cfg(feature = "unstable_cancel_request")]
@@ -79,6 +80,7 @@ pub use ext::*;
7980
pub use maybe_undefined::*;
8081
#[cfg(feature = "unstable_nes")]
8182
pub use nes::*;
83+
#[cfg(feature = "unstable_llm_providers")]
8284
pub use nullable::*;
8385
pub use plan::*;
8486
#[cfg(feature = "unstable_cancel_request")]

src/nullable.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ impl<T> Nullable<T> {
100100
self.0.as_ref()
101101
}
102102

103+
/// Returns a mutable reference to the contained value, if present.
104+
#[must_use]
105+
pub fn value_mut(&mut self) -> Option<&mut T> {
106+
self.0.as_mut()
107+
}
108+
103109
/// Converts into the inner `Option<T>`.
104110
#[must_use]
105111
pub fn into_inner(self) -> Option<T> {

0 commit comments

Comments
 (0)