Skip to content

Commit ad34510

Browse files
committed
Remove code comments to pass doc test.
1 parent 502967b commit ad34510

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

src/file_data_source.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,6 @@ impl FileDataSource {
3737
})
3838
}
3939
/// Copy this data source to the specified target that implements io::Write
40-
/// Example:
41-
/// ```
42-
/// let mut new_file = std::io::fs::OpenOptions::new()
43-
/// .read(true)
44-
/// .write(true)
45-
/// .create(true)
46-
/// .truncate(true)
47-
/// .open(to)?;
48-
///
49-
/// f.source.copy_to(&mut new_file)?;
50-
///```
5140
pub fn copy_to(&self, target: &mut dyn io::Write) -> anyhow::Result<()> {
5241
match self {
5342
FileDataSource::File(file_path) => {

src/lib.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ impl DiskImageBuilder {
8686
}
8787

8888
/// Add a file source to the disk image
89-
/// Example:
90-
/// ```
91-
/// image_builder.set_file_source("/extra/README.md", FileDataSource::File(file_path.to_path_buf()))
92-
/// .set_file_source("/config/config.json", FileDataSource::Data(serialzed_configuration.to_vec()));
93-
/// ```
9489
pub fn set_file_source(&mut self, destination: &str, source: FileDataSource) -> &mut Self {
9590
let destination = destination.to_string();
9691
self.files.insert(
@@ -105,18 +100,12 @@ impl DiskImageBuilder {
105100

106101
/// Add a file with the specified bytes to the disk image
107102
/// NOTE: This is just a convenience wrapper around set_file_source
108-
/// ```
109-
/// image_builder.set_file_source(destination, FileDataSource::Data(data.to_vec()))
110-
/// ```
111103
pub fn set_file_contents(&mut self, destination: &str, data: &[u8]) -> &mut Self {
112104
self.set_file_source(destination, FileDataSource::Data(data.to_vec()))
113105
}
114106

115107
/// Add a file with the specified source file to the disk image
116108
/// NOTE: This is just a convenience wrapper around set_file_source
117-
/// ```
118-
/// image_builder.set_file_source(destination, FileDataSource::File(file_path.to_path_buf()))
119-
/// ```
120109
pub fn set_file(&mut self, destination: &str, file_path: &Path) -> &mut Self {
121110
self.set_file_source(destination, FileDataSource::File(file_path.to_path_buf()))
122111
}

0 commit comments

Comments
 (0)