summaryrefslogtreecommitdiff
path: root/ext/net/ops.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/net/ops.rs')
-rw-r--r--ext/net/ops.rs21
1 files changed, 15 insertions, 6 deletions
diff --git a/ext/net/ops.rs b/ext/net/ops.rs
index b74dc8d75..67d32fe03 100644
--- a/ext/net/ops.rs
+++ b/ext/net/ops.rs
@@ -784,6 +784,7 @@ mod tests {
use std::net::Ipv6Addr;
use std::net::ToSocketAddrs;
use std::path::Path;
+ use std::path::PathBuf;
use std::sync::Arc;
use std::sync::Mutex;
use trust_dns_proto::rr::rdata::a::A;
@@ -991,18 +992,26 @@ mod tests {
fn check_read(
&mut self,
- _p: &Path,
+ p: &str,
_api_name: &str,
- ) -> Result<(), AnyError> {
- Ok(())
+ ) -> Result<PathBuf, AnyError> {
+ Ok(PathBuf::from(p))
}
fn check_write(
&mut self,
- _p: &Path,
+ p: &str,
_api_name: &str,
- ) -> Result<(), AnyError> {
- Ok(())
+ ) -> Result<PathBuf, AnyError> {
+ Ok(PathBuf::from(p))
+ }
+
+ fn check_write_path<'a>(
+ &mut self,
+ p: &'a Path,
+ _api_name: &str,
+ ) -> Result<Cow<'a, Path>, AnyError> {
+ Ok(Cow::Borrowed(p))
}
}