Skip to content

Commit

Permalink
Rename meta to dist.
Browse files Browse the repository at this point in the history
Because both distribution and release are metadata.
  • Loading branch information
theory committed Sep 18, 2024
1 parent ee4a514 commit 8b95926
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions src/meta/mod.rs → src/dist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -931,7 +931,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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -1048,7 +1048,7 @@ impl TryFrom<Distribution> 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",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/release/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/release/v1/mod.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8b95926

Please sign in to comment.