Compare commits
No commits in common. "3442351223c9bab90d81f032dbf924e73591b551" and "75eb03b23fa12cd241883d9ee86f16e93d274ff0" have entirely different histories.
3442351223
...
75eb03b23f
|
@ -86,30 +86,6 @@ version = "1.6.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
||||
|
||||
[[package]]
|
||||
name = "hard-xml"
|
||||
version = "1.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8c049a5d5186e83c3cf139192e81ab9d06c6b20d18c8aa06b38f3f6a5ece8703"
|
||||
dependencies = [
|
||||
"hard-xml-derive",
|
||||
"jetscii",
|
||||
"lazy_static",
|
||||
"memchr",
|
||||
"xmlparser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hard-xml-derive"
|
||||
version = "1.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d24cec6f13bd2423158425bdb5f5ba0f2ddf7d7c2a825c0fdbf20c513df49725"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.15"
|
||||
|
@ -160,16 +136,16 @@ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
|
|||
|
||||
[[package]]
|
||||
name = "opml"
|
||||
version = "1.1.4"
|
||||
version = "1.1.3"
|
||||
dependencies = [
|
||||
"hard-xml",
|
||||
"serde",
|
||||
"strong-xml",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opml_cli"
|
||||
version = "1.1.4"
|
||||
version = "1.1.3"
|
||||
dependencies = [
|
||||
"assert_cmd",
|
||||
"clap",
|
||||
|
@ -266,6 +242,30 @@ dependencies = [
|
|||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strong-xml"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d19fb3a618e2f1039e32317c9f525e6d45c55af704ec7c429aa74412419bebf"
|
||||
dependencies = [
|
||||
"jetscii",
|
||||
"lazy_static",
|
||||
"memchr",
|
||||
"strong-xml-derive",
|
||||
"xmlparser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strong-xml-derive"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92c781f499321613b112be5d9338189ef1ed19689a01edd23d923ea57ad5c7e1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.8.0"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
name = "opml"
|
||||
description = "An OPML parser for Rust."
|
||||
authors = ["Holllo <helllo@holllo.cc>"]
|
||||
version = "1.1.4"
|
||||
version = "1.1.3"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/Holllo/opml"
|
||||
readme = "../README.md"
|
||||
|
@ -15,7 +15,7 @@ keywords = ["xml", "opml"]
|
|||
path = "source/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
hard-xml = "1.10.0"
|
||||
strong-xml = "0.6.3"
|
||||
thiserror = "1.0.29"
|
||||
|
||||
[dependencies.serde]
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
//! To create an OPML document from scratch, use [`OPML::default()`] or the good
|
||||
//! old `OPML { /* ... */ }` syntax.
|
||||
|
||||
use hard_xml::{XmlRead, XmlWrite};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use strong_xml::{XmlRead, XmlWrite};
|
||||
use thiserror::Error;
|
||||
|
||||
/// All possible errors.
|
||||
|
@ -52,7 +52,7 @@ pub enum Error {
|
|||
|
||||
/// The input string is not valid XML.
|
||||
#[error("Failed to process XML file")]
|
||||
XmlError(#[from] hard_xml::XmlError),
|
||||
XmlError(#[from] strong_xml::XmlError),
|
||||
}
|
||||
|
||||
/// The top-level [`OPML`] element.
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<opml version="2.0">
|
||||
<head>
|
||||
<docs />
|
||||
</head>
|
||||
<body>
|
||||
<outline text="Outline Text"/>
|
||||
</body>
|
||||
</opml>
|
|
@ -20,26 +20,6 @@ fn test_minimum_valid_opml() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_valid_empty_docs() {
|
||||
assert_eq!(
|
||||
OPML::from_str(&read("tests/samples/empty_docs.opml").unwrap()).unwrap(),
|
||||
OPML {
|
||||
version: "2.0".to_string(),
|
||||
head: Some(Head {
|
||||
docs: Some("".to_string()),
|
||||
..Head::default()
|
||||
}),
|
||||
body: Body {
|
||||
outlines: vec![Outline {
|
||||
text: "Outline Text".to_string(),
|
||||
..Outline::default()
|
||||
}]
|
||||
},
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_valid_opml_with_everything() {
|
||||
assert_eq!(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
[package]
|
||||
name = "opml_cli"
|
||||
description = "An OPML parser for the command-line."
|
||||
version = "1.1.4"
|
||||
version = "1.1.3"
|
||||
authors = ["Holllo <helllo@holllo.cc>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/Holllo/opml"
|
||||
|
@ -21,7 +21,7 @@ serde_json = "1.0.68"
|
|||
|
||||
[dependencies.opml]
|
||||
path = "../opml_api"
|
||||
version = "1.1.4"
|
||||
version = "1.1.3"
|
||||
|
||||
[dependencies.serde]
|
||||
version = "1.0.130"
|
||||
|
|
Loading…
Reference in New Issue