Skip to content

Commit

Permalink
chore: upgrade to dprint 0.65 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Nov 28, 2023
1 parent f654b40 commit 2b3a77f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ biome_js_parser = { git = "https://github.com/biomejs/biome", tag = "cli/v1.4.0"
biome_js_syntax = { git = "https://github.com/biomejs/biome", tag = "cli/v1.4.0" }
biome_json_formatter = { git = "https://github.com/biomejs/biome", tag = "cli/v1.4.0" }
biome_json_parser = { git = "https://github.com/biomejs/biome", tag = "cli/v1.4.0" }
dprint-core = { version = "0.63.3", default-features = false }
dprint-core = { version = "0.65.0", default-features = false }
serde = { version = "1.0.108", features = ["derive"] }
serde_json = { version = "1.0", optional = true }

Expand Down
8 changes: 5 additions & 3 deletions src/wasm_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ impl SyncPluginHandler<Configuration> for BiomePluginHandler {
fn format(
&mut self,
file_path: &Path,
file_text: &str,
file_text: Vec<u8>,
config: &Configuration,
_format_with_host: impl FnMut(&Path, String, &ConfigKeyMap) -> FormatResult,
_format_with_host: impl FnMut(&Path, Vec<u8>, &ConfigKeyMap) -> FormatResult,
) -> FormatResult {
super::format_text(file_path, file_text, config)
let text = std::str::from_utf8(&file_text)?;
let maybe_text = super::format_text(file_path, &text, config)?;
Ok(maybe_text.map(|t| t.into_bytes()))
}
}

Expand Down

0 comments on commit 2b3a77f

Please sign in to comment.