Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions nmrs/src/api/network_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ impl NetworkManager {
///
/// # Errors
///
/// Returns `ConnectionError::NoSavedConnection` if no VPN with the given
/// name is found.
/// Returns an error only if the operation fails unexpectedly.
/// Returns `Ok(())` if no matching VPN connection is found.
pub async fn forget_vpn(&self, name: &str) -> Result<()> {
crate::core::vpn::forget_vpn(&self.conn, name).await
}
Expand Down Expand Up @@ -555,8 +555,8 @@ impl NetworkManager {
///
/// # Returns
///
/// Returns `Ok(())` if at least one connection was deleted successfully.
/// Returns `NoSavedConnection` if no matching connections were found.
/// Returns `Ok(())` if one or more connections were deleted successfully,
/// or if no matching connections were found.
pub async fn forget(&self, ssid: &str) -> Result<()> {
forget_by_name_and_type(
&self.conn,
Expand Down
2 changes: 1 addition & 1 deletion nmrs/src/core/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ pub(crate) async fn forget_by_name_and_type(
debug!("Bluetooth device '{name}' has no NetworkManager connection profile (device may only be paired in BlueZ)");
Ok(())
} else {
Err(ConnectionError::NoSavedConnection)
Ok(())
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion nmrs/src/core/vpn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ pub(crate) async fn forget_vpn(conn: &Connection, name: &str) -> Result<()> {
}

debug!("No saved VPN connection found for '{name}'");
Err(crate::api::models::ConnectionError::NoSavedConnection)
Ok(())
}

/// Gets detailed information about a WireGuard connection.
Expand Down
Loading