mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
cli: apply lint fixes
This commit is contained in:
@@ -418,7 +418,7 @@ mod tests {
|
||||
.to_string_lossy()
|
||||
.to_string();
|
||||
assert_eq!(
|
||||
RequestedVersion::try_from((&exe).as_str()).unwrap(),
|
||||
RequestedVersion::try_from(exe.as_str()).unwrap(),
|
||||
RequestedVersion::Path(exe),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ where
|
||||
e,
|
||||
format!(
|
||||
"failed to execute command '{}'",
|
||||
(&command_str).as_ref().to_string_lossy()
|
||||
command_str.as_ref().to_string_lossy()
|
||||
),
|
||||
)
|
||||
})
|
||||
|
||||
@@ -19,9 +19,7 @@ where
|
||||
/// Waits for the barrier to be closed, returning a value if one was sent.
|
||||
pub async fn wait(&mut self) -> Result<T, RecvError> {
|
||||
loop {
|
||||
if let Err(e) = self.0.changed().await {
|
||||
return Err(e);
|
||||
}
|
||||
self.0.changed().await?;
|
||||
|
||||
if let Some(v) = *(self.0.borrow()) {
|
||||
return Ok(v);
|
||||
|
||||
Reference in New Issue
Block a user