diff --git a/README.md b/README.md index a377900..65ad582 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ pgxn_meta = "0.2" ``` rust use serde_json::json; -use pgxn_meta::meta::Distribution; +use pgxn_meta::dist::Distribution; func main() { // Load the contents of a META.json file into a serde_json::Value. diff --git a/src/meta/mod.rs b/src/dist/mod.rs similarity index 99% rename from src/meta/mod.rs rename to src/dist/mod.rs index d5a75b5..5cce581 100644 --- a/src/meta/mod.rs +++ b/src/dist/mod.rs @@ -2,7 +2,7 @@ PGXN `META.json` validation and management. This module provides interfaces to load, validate, and manipulate PGXN -`META.json` files. It supports both the [v1] and [v2] specs. +distribution `META.json` files. It supports both the [v1] and [v2] specs. [v1]: https://rfcs.pgxn.org/0001-meta-spec-v1.html [v2]: https://github.com/pgxn/rfcs/pull/3 @@ -931,7 +931,7 @@ impl TryFrom for Distribution { /// ``` rust /// # use std::error::Error; /// use serde_json::json; - /// use pgxn_meta::meta::*; + /// use pgxn_meta::dist::*; /// /// let meta_json = json!({ /// "name": "pair", @@ -981,7 +981,7 @@ impl TryFrom<&[&Value]> for Distribution { /// ``` rust /// # use std::error::Error; /// use serde_json::json; - /// use pgxn_meta::meta::*; + /// use pgxn_meta::dist::*; /// /// let meta_json = json!({ /// "name": "pair", @@ -1048,7 +1048,7 @@ impl TryFrom for Value { /// ``` rust /// # use std::error::Error; /// use serde_json::{json, Value}; - /// use pgxn_meta::meta::*; + /// use pgxn_meta::dist::*; /// /// let meta_json = json!({ /// "name": "pair", diff --git a/src/meta/tests.rs b/src/dist/tests.rs similarity index 100% rename from src/meta/tests.rs rename to src/dist/tests.rs diff --git a/src/meta/v1/mod.rs b/src/dist/v1/mod.rs similarity index 100% rename from src/meta/v1/mod.rs rename to src/dist/v1/mod.rs diff --git a/src/meta/v1/tests.rs b/src/dist/v1/tests.rs similarity index 100% rename from src/meta/v1/tests.rs rename to src/dist/v1/tests.rs diff --git a/src/meta/v2/mod.rs b/src/dist/v2/mod.rs similarity index 100% rename from src/meta/v2/mod.rs rename to src/dist/v2/mod.rs diff --git a/src/lib.rs b/src/lib.rs index 19668f1..d1e2f6f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ files. It supports both the [v1] and [v2] specs. */ -pub mod meta; +pub mod dist; pub mod release; mod util; // private utilities pub mod valid; diff --git a/src/release/mod.rs b/src/release/mod.rs index e3b6d24..2729b64 100644 --- a/src/release/mod.rs +++ b/src/release/mod.rs @@ -17,7 +17,7 @@ It supports both the [v1] and [v2] specs. */ -use crate::meta::*; +use crate::dist::*; use crate::util; use chrono::{DateTime, Utc}; diff --git a/src/release/v1/mod.rs b/src/release/v1/mod.rs index 5cd796a..2383667 100644 --- a/src/release/v1/mod.rs +++ b/src/release/v1/mod.rs @@ -1,5 +1,5 @@ use super::Release; -use crate::meta::v1 as dist; +use crate::dist::v1 as dist; use serde_json::{json, Value}; use std::error::Error; diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 72f546e..51c7e29 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -4,7 +4,7 @@ mod v2; #[test] fn test_readme_example() { - use crate::meta::Distribution; + use crate::dist::Distribution; use serde_json::json; // Load the contents of a META.json file into a serde_json::Value.