Tidy up the code (#12116)
Small follow-ups for https://github.com/zed-industries/zed/pull/12063 and https://github.com/zed-industries/zed/pull/12103 Release Notes: - N/A
This commit is contained in:
@@ -137,7 +137,7 @@ impl Database {
|
||||
&self,
|
||||
id: DevServerId,
|
||||
name: &str,
|
||||
ssh_connection_string: &Option<String>,
|
||||
ssh_connection_string: Option<&str>,
|
||||
user_id: UserId,
|
||||
) -> crate::Result<proto::DevServerProjectsUpdate> {
|
||||
self.transaction(|tx| async move {
|
||||
@@ -150,7 +150,9 @@ impl Database {
|
||||
|
||||
dev_server::Entity::update(dev_server::ActiveModel {
|
||||
name: ActiveValue::Set(name.trim().to_string()),
|
||||
ssh_connection_string: ActiveValue::Set(ssh_connection_string.clone()),
|
||||
ssh_connection_string: ActiveValue::Set(
|
||||
ssh_connection_string.map(ToOwned::to_owned),
|
||||
),
|
||||
..dev_server.clone().into_active_model()
|
||||
})
|
||||
.exec(&*tx)
|
||||
|
||||
@@ -2442,7 +2442,7 @@ async fn rename_dev_server(
|
||||
.rename_dev_server(
|
||||
dev_server_id,
|
||||
&request.name,
|
||||
&request.ssh_connection_string,
|
||||
request.ssh_connection_string.as_deref(),
|
||||
session.user_id(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user