Use consistent spacing before line comments

This commit is contained in:
David Tolnay 2020-01-28 11:50:04 -08:00
parent 1cce98b133
commit 1901471de1
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 4 additions and 4 deletions

View File

@ -118,7 +118,7 @@ pub enum DataStoreError {
#[derive(Error, Debug)]
pub struct MyError {
msg: String,
#[source] // optional if field name is `source`
#[source] // optional if field name is `source`
source: anyhow::Error,
}
```
@ -132,7 +132,7 @@ pub enum DataStoreError {
#[derive(Error, Debug)]
pub struct MyError {
msg: String,
backtrace: Backtrace, // automatically detected
backtrace: Backtrace, // automatically detected
}
```

View File

@ -126,7 +126,7 @@
//! #[derive(Error, Debug)]
//! pub struct MyError {
//! msg: String,
//! #[source] // optional if field name is `source`
//! #[source] // optional if field name is `source`
//! source: anyhow::Error,
//! }
//! #
@ -147,7 +147,7 @@
//! #[derive(Error, Debug)]
//! pub struct MyError {
//! msg: String,
//! backtrace: Backtrace, // automatically detected
//! backtrace: Backtrace, // automatically detected
//! }
//! # };
//! ```