Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
yuma140902 committed Dec 18, 2023
1 parent 52fe94f commit 2b450f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pub use blob_loader::*;
pub use json_loader::*;
pub use template_loader::*;
pub use text_loader::*;
pub use yaml_loader::*;
pub use text_with_frontmatter_loader::*;
pub use yaml_loader::*;

/// [`Loader`] reads [`Value`] from a file. There are several Loaders depending on the type of file.
/// For example, [`FrontmatterLoader`](self::frontmatter_loader::FrontmatterLoader) usually loads markdown files, while [`StaticResourceLoader`](self::static_resource_loader::StaticResourceLoader) loads static resources.
Expand Down
3 changes: 2 additions & 1 deletion src/loader/yaml_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ pub struct YamlLoader;

impl Loader for YamlLoader {
fn load(reader: impl std::io::prelude::Read) -> anyhow::Result<Value> {
let yaml = serde_yaml::from_reader(reader).with_context(|| "Could not parse YAML".to_string())?;
let yaml =
serde_yaml::from_reader(reader).with_context(|| "Could not parse YAML".to_string())?;

Ok(Value::JSON(yaml))
}
Expand Down
3 changes: 2 additions & 1 deletion src/pipeline/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use path_absolutize::Absolutize;
use tracing::{debug, info, span, Level};

use crate::{
BlobLoader, JsonLoader, Loader, TemplateLoader, TextLoader, TextWithFrontmatterLoader, Value, YamlLoader,
BlobLoader, JsonLoader, Loader, TemplateLoader, TextLoader, TextWithFrontmatterLoader, Value,
YamlLoader,
};

use super::Pipeline;
Expand Down

0 comments on commit 2b450f0

Please sign in to comment.