Skip to content

Commit a7f957e

Browse files
Merge pull request #629 from swimos/docs3
Tidy up of crate/module API: Stage 3
2 parents ee6f9c3 + efc54f7 commit a7f957e

File tree

206 files changed

+559
-15608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+559
-15608
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ clap = "4.1"
104104
crossbeam-queue = { version = "0.3" }
105105
crossbeam-channel = { version = "0.5" }
106106
hyper = "0.14"
107-
lazy_static = "1.4.0"
108107
percent-encoding = "2.1.0"
109108
mime = "0.3"
110109
serde_json = "1.0"

api/formats/swimos_msgpack/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ swimos_model = { path = "../../swimos_model" }
1212
bytes = { workspace = true }
1313
byteorder = { workspace = true }
1414
rmp = { workspace = true }
15+
num-bigint = { workspace = true }
1516

1617
[dev-dependencies]
1718

api/formats/swimos_msgpack/src/reader/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ use std::str::Utf8Error;
1919

2020
use bytes::{Buf, BufMut, BytesMut};
2121
use either::Either;
22+
use num_bigint::Sign;
2223
use rmp::decode::{read_str_len, ValueReadError};
2324
use rmp::Marker;
2425

2526
use swimos_form::read::ReadEvent;
2627
use swimos_form::read::Recognizer;
2728
use swimos_form::read::{ReadError, StructuralReadable};
28-
use swimos_model::bigint::{BigInt, BigUint, Sign};
29+
use swimos_model::{BigInt, BigUint};
2930

3031
use crate::{BIG_INT_EXT, BIG_UINT_EXT};
3132

api/formats/swimos_msgpack/src/writer/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use std::io;
1919
use std::io::Write;
2020

2121
use byteorder::WriteBytesExt;
22+
use num_bigint::Sign;
2223
use rmp::encode::{
2324
write_array_len, write_bin, write_bool, write_ext_meta, write_f64, write_map_len, write_nil,
2425
write_sint, write_str, write_u64, ValueWriteError,
@@ -28,7 +29,7 @@ use swimos_form::write::{
2829
BodyWriter, HeaderWriter, Label, PrimitiveWriter, RecordBodyKind, StructuralWritable,
2930
StructuralWriter,
3031
};
31-
use swimos_model::bigint::{BigInt, BigUint, Sign};
32+
use swimos_model::{BigInt, BigUint};
3233

3334
use crate::{BIG_INT_EXT, BIG_UINT_EXT};
3435

api/formats/swimos_msgpack/src/writer/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use crate::MsgPackWriteError;
1616
use std::io::ErrorKind;
17-
use swimos_model::bigint::{BigInt, BigUint};
17+
use swimos_model::{BigInt, BigUint};
1818

1919
#[test]
2020
fn msgpack_write_err_display() {

api/formats/swimos_recon/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ tokio-util = { workspace = true, features = ["codec"] }
2323
bytes = { workspace = true }
2424
smallvec = { workspace = true }
2525
thiserror = { workspace = true }
26+
num-bigint = { workspace = true }
2627

2728
[dev-dependencies]
2829
tokio = { workspace = true, features = ["io-util", "macros", "rt", "fs"] }

api/formats/swimos_recon/src/printer/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use swimos_form::write::{
2222
BodyWriter, HeaderWriter, Label, PrimitiveWriter, RecordBodyKind, StructuralWritable,
2323
StructuralWriter,
2424
};
25-
use swimos_model::bigint::{BigInt, BigUint};
26-
use swimos_model::write_string_literal;
25+
use swimos_model::literal::write_string_literal;
26+
use swimos_model::{BigInt, BigUint};
2727

2828
/// Print an inline Recon representation of [`StructuralWritable`] value.
2929
///

api/formats/swimos_recon/src/recon_parser/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use nom::IResult;
2121
use std::borrow::Cow;
2222
use std::ops::{Add, Neg, Sub};
2323
use swimos_form::read::{NumericValue, ReadEvent};
24-
use swimos_model::bigint::{BigInt, BigUint};
2524
use swimos_model::{Attr, Item, Text, Value};
25+
use swimos_model::{BigInt, BigUint};
2626

2727
fn span(input: &str) -> Span<'_> {
2828
Span::new(input)

api/formats/swimos_recon/src/recon_parser/tokens.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ use nom::combinator::{map, map_res, opt, peek, recognize};
1919
use nom::multi::{many0_count, many1_count};
2020
use nom::sequence::{delimited, pair, preceded, tuple};
2121
use nom::IResult;
22+
use num_bigint::{ParseBigIntError, Sign};
2223
use num_traits::Num;
2324
use std::borrow::Cow;
2425
use std::convert::TryFrom;
2526
use std::fmt::{Display, Formatter};
2627
use std::ops::Neg;
2728
use swimos_form::read::NumericValue;
28-
use swimos_model::bigint::{BigInt, BigUint, ParseBigIntError, Sign};
2929
use swimos_model::identifier::{is_identifier_char, is_identifier_start};
3030
use swimos_model::Text;
31+
use swimos_model::{BigInt, BigUint};
3132

3233
fn unwrap_span(span: Span<'_>) -> &str {
3334
&span

api/swimos_agent_protocol/src/ad_hoc/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ use std::fmt::Debug;
1616

1717
use bytes::{Buf, BufMut, BytesMut};
1818
use swimos_form::{read::RecognizerReadable, write::StructuralWritable};
19-
use swimos_model::{address::Address, Text, TryFromUtf8Bytes};
19+
use swimos_model::Text;
2020
use swimos_recon::{WithLenRecognizerDecoder, WithLenReconEncoder};
21-
use swimos_utilities::encoding::WithLengthBytesCodec;
21+
use swimos_utilities::encoding::{TryFromUtf8Bytes, WithLengthBytesCodec};
2222
use tokio_util::codec::{Decoder, Encoder};
2323

24-
use swimos_api::error::FrameIoError;
24+
use swimos_api::{address::Address, error::FrameIoError};
2525

2626
use crate::AdHocCommand;
2727

0 commit comments

Comments
 (0)