Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove re-export of types into top-level #303

Merged
merged 1 commit into from
Sep 12, 2023
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ To use the library, include in your toml:
stellar-xdr = { version = "...", default-features = true, features = [] }
```

XDR types are available under modules, with the `curr` module containing XDR
types built from the `stellar/stellar-xdr` `curr` branch. Other top-level
modules are built from other `stellar/stellar-xdr` branches and releases if
enabled with features.

##### Features

The crate has several features, tiers of functionality, ancillary
Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ pub const VERSION: Version = Version {

#[cfg(feature = "curr")]
pub mod curr;
#[cfg(all(feature = "curr", not(feature = "next")))]
pub use curr::*;

#[cfg(feature = "next")]
pub mod next;
#[cfg(all(not(feature = "curr"), feature = "next"))]
pub use next::*;
5 changes: 5 additions & 0 deletions tests/tx_debug_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
not(all(feature = "curr", feature = "next"))
))]

#[cfg(feature = "curr")]
use stellar_xdr::curr as stellar_xdr;
#[cfg(feature = "next")]
use stellar_xdr::next as stellar_xdr;

use stellar_xdr::{BytesM, Error, Hash, StringM, VecM};

#[test]
Expand Down
5 changes: 5 additions & 0 deletions tests/tx_prot18.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
))]
#![cfg(all(feature = "std", feature = "base64"))]

#[cfg(feature = "curr")]
use stellar_xdr::curr as stellar_xdr;
#[cfg(feature = "next")]
use stellar_xdr::next as stellar_xdr;

use stellar_xdr::{Error, OperationBody, ReadXdr, SequenceNumber, TransactionEnvelope};

#[test]
Expand Down
5 changes: 5 additions & 0 deletions tests/tx_read_edge_cases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
))]
#![cfg(all(feature = "std", feature = "base64"))]

#[cfg(feature = "curr")]
use stellar_xdr::curr as stellar_xdr;
#[cfg(feature = "next")]
use stellar_xdr::next as stellar_xdr;

use std::io::{self, Cursor};
use stellar_xdr::Error;
use stellar_xdr::{DepthLimitedRead, ReadXdr, WriteXdr, DEFAULT_XDR_RW_DEPTH_LIMIT};
Expand Down
5 changes: 5 additions & 0 deletions tests/tx_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
))]
#![cfg(all(feature = "std", feature = "serde"))]

#[cfg(feature = "curr")]
use stellar_xdr::curr as stellar_xdr;
#[cfg(feature = "next")]
use stellar_xdr::next as stellar_xdr;

use stellar_xdr::{BytesM, Hash, StringM, VecM};

#[test]
Expand Down
5 changes: 5 additions & 0 deletions tests/tx_small.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
not(all(feature = "curr", feature = "next"))
))]

#[cfg(feature = "curr")]
use stellar_xdr::curr as stellar_xdr;
#[cfg(feature = "next")]
use stellar_xdr::next as stellar_xdr;

use stellar_xdr::{
Error, Memo, MuxedAccount, Preconditions, SequenceNumber, Transaction, TransactionEnvelope,
TransactionExt, TransactionV1Envelope, Uint256,
Expand Down