Skip to content

Commit

Permalink
ci: fix new compile warn and clippy of 1.84 (#402)
Browse files Browse the repository at this point in the history
looks like this was a new lint from
rust-lang/rust#48919 ,
and the lint was correct about `fs2::FileExt` vs

```rust
    #[unstable(feature = "file_lock", issue = "130994")]
    pub fn unlock(&self) -> io::Result<()> {
        self.inner.unlock()
    }

```

Co-authored-by: dj8yf0μl <noreply@nowhere.org>
  • Loading branch information
dj8yfo and dj8yf0μl authored Jan 29, 2025
1 parent aeab221 commit a9886fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions workspaces/src/network/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ impl Sandbox {
}
}

pub(crate) async fn from_builder_with_version<'a>(
build: NetworkBuilder<'a, Self>,
pub(crate) async fn from_builder_with_version(
build: NetworkBuilder<'_, Self>,
version: &str,
) -> Result<Self> {
// Check the conditions of the provided rpc_url and validator_key
Expand Down
4 changes: 2 additions & 2 deletions workspaces/src/network/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl SandboxServer {
/// the sandbox node.
pub(crate) fn unlock_lockfiles(&mut self) -> Result<()> {
if let Some(rpc_port_lock) = self.rpc_port_lock.take() {
rpc_port_lock.unlock().map_err(|e| {
<std::fs::File as FileExt>::unlock(&rpc_port_lock).map_err(|e| {
ErrorKind::Io.full(
format!(
"failed to unlock lockfile for rpc_port={:?}",
Expand All @@ -182,7 +182,7 @@ impl SandboxServer {
})?;
}
if let Some(net_port_lock) = self.net_port_lock.take() {
net_port_lock.unlock().map_err(|e| {
<std::fs::File as FileExt>::unlock(&net_port_lock).map_err(|e| {
ErrorKind::Io.full(
format!("failed to unlock lockfile for net_port={:?}", self.net_port),
e,
Expand Down
2 changes: 1 addition & 1 deletion workspaces/src/worker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub fn sandbox<'a>() -> NetworkBuilder<'a, Sandbox> {
}

/// Spin up a new sandbox instance, and grab a [`Worker`] that interacts with it.
pub async fn sandbox_with_version<'a>(version: &str) -> Result<Worker<Sandbox>> {
pub async fn sandbox_with_version(version: &str) -> Result<Worker<Sandbox>> {
let network_builder = NetworkBuilder::new("sandbox");
let network = Sandbox::from_builder_with_version(network_builder, version).await?;
Ok(Worker::new(network))
Expand Down

0 comments on commit a9886fd

Please sign in to comment.