Various cleanup tasks

* Remove old `extern crate` stmts
* Remove rust-skeptic
* Clean up Cargo.toml
This commit is contained in:
Paul Woolcock
2020-09-25 16:44:06 -04:00
parent c30b4da57c
commit 0b4ee7bfb2
38 changed files with 64 additions and 112 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ mod tests {
use std::{fs::OpenOptions, io::Cursor};
use tempfile::{tempdir, NamedTempFile};
const DOC: &'static str = indoc!(
const DOC: &'static str = indoc::indoc!(
r#"
{
"base": "https://example.com",
+5 -7
View File
@@ -4,19 +4,17 @@ use std::{
path::Path,
};
use crate::tomlcrate;
use crate::data::Data;
use crate::Result;
/// Attempts to deserialize a Data struct from a string
pub fn from_str(s: &str) -> Result<Data> {
Ok(tomlcrate::from_str(s)?)
Ok(toml::from_str(s)?)
}
/// Attempts to deserialize a Data struct from a slice of bytes
pub fn from_slice(s: &[u8]) -> Result<Data> {
Ok(tomlcrate::from_slice(s)?)
Ok(toml::from_slice(s)?)
}
/// Attempts to deserialize a Data struct from something that implements
@@ -36,12 +34,12 @@ pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Data> {
/// Attempts to serialize a Data struct to a String
pub fn to_string(data: &Data) -> Result<String> {
Ok(tomlcrate::to_string_pretty(data)?)
Ok(toml::to_string_pretty(data)?)
}
/// Attempts to serialize a Data struct to a Vec of bytes
pub fn to_vec(data: &Data) -> Result<Vec<u8>> {
Ok(tomlcrate::to_vec(data)?)
Ok(toml::to_vec(data)?)
}
/// Attempts to serialize a Data struct to something that implements the
@@ -83,7 +81,7 @@ mod tests {
use std::{fs::OpenOptions, io::Cursor};
use tempfile::{tempdir, NamedTempFile};
const DOC: &'static str = indoc!(
const DOC: &'static str = indoc::indoc!(
r#"
base = "https://example.com"
client_id = "adbc01234"