We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Vec
1 parent 075f22d commit 692d39fCopy full SHA for 692d39f
src/lib.rs
@@ -75,10 +75,8 @@ impl DiskImageBuilder {
75
76
/// Configures the runtime behavior of the bootloader.
77
pub fn set_boot_config(&mut self, boot_config: &BootConfig) -> &mut Self {
78
- let json =
79
- serde_json::to_string_pretty(boot_config).expect("failed to serialize BootConfig");
80
- let bytes = json.as_bytes();
81
- self.set_file_source(CONFIG_FILE_NAME, FileDataSource::Data(bytes.to_vec()))
+ let json = serde_json::to_vec_pretty(boot_config).expect("failed to serialize BootConfig");
+ self.set_file_source(CONFIG_FILE_NAME.into(), FileDataSource::Data(json))
82
}
83
84
/// Add a file with the specified bytes to the disk image
0 commit comments