Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Update toml & shield from future toml changes #5

Merged
merged 3 commits into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "netlify_toml"
version = "0.2.8"
version = "0.3.0"
authors = ["David Calavera <david.calavera@gmail.com>"]
license = "MIT"
readme = "README.md"
Expand All @@ -10,4 +10,4 @@ homepage = "https://github.com/calavera/netlify-toml-rs"
[dependencies]
serde = "1.0"
serde_derive = "1.0"
toml = "0.4.9"
toml = "0.5"
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ pub struct Template {
pub environment: Option<HashMap<String, String>>,
}

/// Base crate error type
pub type Error = toml::de::Error;

/// Parses the contents of a netlify.toml file as a Config structure.
///
/// # Arguments
Expand All @@ -87,7 +90,7 @@ pub struct Template {
///
/// let result = netlify_toml::from_str(io);
/// ```
pub fn from_str(io: &str) -> Result<Config, toml::de::Error> {
pub fn from_str(io: &str) -> Result<Config, Error> {
toml::from_str::<Config>(io)
}

Expand Down