Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aa7d1c2

Browse files
killercupyoshuawuyts
andauthored
Verbose errors: Apply suggestions
Co-Authored-By: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
1 parent e01f07d commit aa7d1c2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

‎src/fs/file.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl File {
114114
pub async fn open<P: AsRef<Path>>(path: P) -> io::Result<File> {
115115
let path = path.as_ref().to_owned();
116116
let file = spawn_blocking(move || {
117-
std::fs::File::open(&path).context(|| format!("Could not open `{}`", path.display()))
117+
std::fs::File::open(&path).context(|| format!("could not open `{}`", path.display()))
118118
})
119119
.await?;
120120
Ok(File::new(file, true))
@@ -153,7 +153,7 @@ impl File {
153153
let path = path.as_ref().to_owned();
154154
let file = spawn_blocking(move || {
155155
std::fs::File::create(&path)
156-
.context(|| format!("Could not create `{}`", path.display()))
156+
.context(|| format!("could not create `{}`", path.display()))
157157
})
158158
.await?;
159159
Ok(File::new(file, true))

‎src/io/stdin.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl Stdin {
163163
}
164164
})
165165
.await
166-
.context(|| String::from("Could not read line on stdin"))
166+
.context(|| String::from("could not read line on stdin"))
167167
}
168168

169169
/// Locks this handle to the standard input stream, returning a readable guard.

‎src/net/udp/mod.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl UdpSocket {
159159
.poll_write_with(cx, |inner| inner.send_to(buf, &addr))
160160
})
161161
.await
162-
.context(|| format!("Could not send packet to {}", addr))
162+
.context(|| format!("could not send packet to {}", addr))
163163
}
164164

165165
/// Receives data from the socket.
@@ -190,7 +190,7 @@ impl UdpSocket {
190190
.context(|| {
191191
use std::fmt::Write;
192192

193-
let mut error = String::from("Could not receive data on ");
193+
let mut error = String::from("could not receive data on ");
194194
if let Ok(addr) = self.local_addr() {
195195
let _ = write!(&mut error, "{}", addr);
196196
} else {
@@ -277,7 +277,7 @@ impl UdpSocket {
277277
.context(|| {
278278
use std::fmt::Write;
279279

280-
let mut error = String::from("Could not send data on ");
280+
let mut error = String::from("could not send data on ");
281281
if let Ok(addr) = self.local_addr() {
282282
let _ = write!(&mut error, "{}", addr);
283283
} else {
@@ -312,7 +312,7 @@ impl UdpSocket {
312312
.context(|| {
313313
use std::fmt::Write;
314314

315-
let mut error = String::from("Could not receive data on ");
315+
let mut error = String::from("could not receive data on ");
316316
if let Ok(addr) = self.local_addr() {
317317
let _ = write!(&mut error, "{}", addr);
318318
} else {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /