Skip to content

Commit

Permalink
Merge pull request #88 from axodotdev/handle_type_alias
Browse files Browse the repository at this point in the history
fix: change use of type alias
  • Loading branch information
mistydemeo authored May 22, 2024
2 parents db0d110 + ae841a5 commit d9802a8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ use miette::{MietteSpanContents, SourceCode, SourceSpan};
use crate::{error::*, LocalAsset};

#[cfg(feature = "toml-edit")]
#[allow(deprecated)]
use crate::toml_edit::Document;
use crate::toml_edit::DocumentMut;

#[cfg(feature = "json-serde")]
use crate::serde_json;
Expand Down Expand Up @@ -128,10 +127,8 @@ impl SourceFile {

/// Try to deserialize the contents of the SourceFile as a toml_edit Document
#[cfg(feature = "toml-edit")]
#[allow(deprecated)]
pub fn deserialize_toml_edit(&self) -> Result<Document> {
#[allow(deprecated)]
let toml = self.contents().parse::<Document>().map_err(|details| {
pub fn deserialize_toml_edit(&self) -> Result<DocumentMut> {
let toml = self.contents().parse::<DocumentMut>().map_err(|details| {
let span = details.span().map(SourceSpan::from);
AxoassetError::TomlEdit {
source: self.clone(),
Expand Down

0 comments on commit d9802a8

Please sign in to comment.