Skip to content

Commit

Permalink
refactor: to_string to to_owned
Browse files Browse the repository at this point in the history
  • Loading branch information
kozistr committed Jun 9, 2024
1 parent ee2edb6 commit 5acf030
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions backends/python/src/management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ impl BackendProcess {
// Process args
let mut python_server_args = vec![
model_path,
"--dtype".to_string(),
"--dtype".to_owned(),
dtype,
"--uds-path".to_string(),
uds_path.to_string(),
"--logger-level".to_string(),
"INFO".to_string(),
"--json-output".to_string(),
"--uds-path".to_owned(),
uds_path.to_owned(),
"--logger-level".to_owned(),
"INFO".to_owned(),
"--json-output".to_owned(),
];

// OpenTelemetry
if let Some(otlp_endpoint) = otlp_endpoint {
python_server_args.push("--otlp-endpoint".to_string());
python_server_args.push("--otlp-endpoint".to_owned());
python_server_args.push(otlp_endpoint);
}

python_server_args.push("--otlp-service-name".to_string());
python_server_args.push("--otlp-service-name".to_owned());
python_server_args.push(otlp_service_name);

// Copy current process env
Expand All @@ -68,7 +68,7 @@ impl BackendProcess {
Err(err) => {
if err.kind() == io::ErrorKind::NotFound {
return Err(BackendError::Start(
"python-text-embeddings-server not found in PATH".to_string(),
"python-text-embeddings-server not found in PATH".to_owned(),
));
}
return Err(BackendError::Start(err.to_string()));
Expand Down
2 changes: 1 addition & 1 deletion router/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub async fn start_server(model_id: String, revision: Option<String>, dtype: DTy
2_000_000,
None,
None,
"text-embeddings-inference.server".to_string(),
"text-embeddings-inference.server".to_owned(),
None,
)
});
Expand Down

0 comments on commit 5acf030

Please sign in to comment.