Skip to content
Open
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
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
ignore:
- dependency-name: dtolnay/rust-toolchain
19 changes: 19 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches: [master]
pull_request:

name: Continuous integration

jobs:

fmt:
name: format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all --check

6 changes: 2 additions & 4 deletions tree-buf-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ extern crate syn;
#[macro_use]
extern crate quote;

mod utils;
mod decode;
mod encode;
mod utils;

use {
decode::impl_decode_macro,
encode::impl_encode_macro,
syn::{parse_macro_input, DeriveInput},
};



#[proc_macro_derive(Encode)]
pub fn encode_macro_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let ast = parse_macro_input!(input as DeriveInput);
Expand All @@ -27,4 +25,4 @@ pub fn decode_macro_derive(input: proc_macro::TokenStream) -> proc_macro::TokenS
let ast = parse_macro_input!(input as DeriveInput);
let output = impl_decode_macro(&ast);
proc_macro::TokenStream::from(output)
}
}
2 changes: 1 addition & 1 deletion tree-buf/src/experimental/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! or resulting file may change unexpectedly with any version. Even so, it is worth
//! poking around.

pub mod options;
#[doc(hidden)]
pub mod scratch;
pub mod stats;
pub mod options;
13 changes: 3 additions & 10 deletions tree-buf/src/experimental/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@

use crate::prelude::*;

pub use crate::internal::options::{
DisableParallel,
EnableParallel,
LosslessFloat,
LossyFloatTolerance,
EncodeOptions, DecodeOptions
};

pub use crate::{encode_options, decode_options};
pub use crate::internal::options::{DecodeOptions, DisableParallel, EnableParallel, EncodeOptions, LosslessFloat, LossyFloatTolerance};

pub use crate::{decode_options, encode_options};

#[cfg(feature = "encode")]
pub fn encode_with_options<T: Encodable>(value: &T, options: &impl EncodeOptions) -> Vec<u8> {
Expand All @@ -38,4 +31,4 @@ pub fn decode_with_options<T: Decodable>(bytes: &[u8], options: &impl DecodeOpti
profile_fn!(T, decode_with_options);
let sticks = decode_root(bytes)?;
T::decode(sticks, options)
}
}
2 changes: 1 addition & 1 deletion tree-buf/src/internal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pub mod parallel;
pub mod rust_std;
pub mod types;

pub use {branch::*, encoder_decoder::*, encodings::*, options::*, parallel::*, rust_std::*, types::*};
pub(crate) use buffer::*;
pub use {branch::*, encoder_decoder::*, encodings::*, options::*, parallel::*, rust_std::*, types::*};

pub(crate) use markers::*;

Expand Down