Skip to content

Commit af9668d

Browse files
committed
Merge #5: Rename the package to bencode2json
63b33cb chore: add mandatory package attributes (Jose Celano) 875380d chore: rename package to bencode2json (Jose Celano) Pull request description: Rename the package to `bencode2json`. ACKs for top commit: josecelano: ACK 63b33cb Tree-SHA512: 67aa4a0c97522351fb6244e43fe1d8116e8f506788102872bc0f3a123675d0ab063b7ee9a4c927818ee1ebee1ed1d110bb360ec21625a9f2da40c84c8de769a7
2 parents ac1f13f + 63b33cb commit af9668d

13 files changed

+42
-37
lines changed

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
[package]
2+
authors = ["Jose Celano <[email protected]>", "Cameron Garnham <[email protected]>"]
3+
description = "A Bencoded to JSON converter library and console app with no intermediary in-memory structure."
24
edition = "2021"
3-
name = "torrust-bencode2json"
5+
exclude = [".*", "cSpell.json", "rustfmt.toml"]
6+
license = "LGPL-3.0"
7+
name = "bencode2json"
8+
repository = "https://github.com/torrust/bencode2json"
49
version = "0.1.0"
510

611
[workspace]

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,21 @@ echo "d3:foold3:bari42eeee" | cargo run | jq
9292
You can install the binary with:
9393

9494
```console
95-
cargo install torrust-bencode2json
95+
cargo install bencode2json
9696
```
9797

9898
Or by using [cargo-binstall](https://github.com/cargo-bins/cargo-binstall):
9999

100100
```console
101-
cargo binstall torrust-bencode2json
101+
cargo binstall bencode2json
102102
```
103103

104104
## Library
105105

106106
You can install the library with:
107107

108108
```console
109-
cargo add torrust-bencode2json
109+
cargo add bencode2json
110110
```
111111

112112
There two ways of using the library:
@@ -117,7 +117,7 @@ There two ways of using the library:
117117
Example using the high-level parser wrappers:
118118

119119
```rust
120-
use torrust_bencode2json::{try_bencode_to_json};
120+
use bencode2json::{try_bencode_to_json};
121121

122122
let result = try_bencode_to_json(b"d4:spam4:eggse").unwrap();
123123

@@ -127,7 +127,7 @@ assert_eq!(result, r#"{"spam":"eggs"}"#);
127127
Example using the low-level parser:
128128

129129
```rust
130-
use torrust_bencode2json::parsers::{BencodeParser};
130+
use bencode2json::parsers::{BencodeParser};
131131

132132
let mut output = String::new();
133133

examples/parser_file_in_file_out.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::{
1111
};
1212

1313
use clap::{Arg, Command};
14-
use torrust_bencode2json::parsers::BencodeParser;
14+
use bencode2json::parsers::BencodeParser;
1515

1616
fn main() {
1717
let matches = Command::new("parser_file_in_file_out")

examples/parser_stdin_stdout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! It prints "spam".
88
use std::io;
99

10-
use torrust_bencode2json::parsers::BencodeParser;
10+
use bencode2json::parsers::BencodeParser;
1111

1212
fn main() {
1313
let input = Box::new(io::stdin());

examples/parser_string_in_string_out.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! ```
66
//!
77
//! It prints "spam".
8-
use torrust_bencode2json::parsers::BencodeParser;
8+
use bencode2json::parsers::BencodeParser;
99

1010
fn main() {
1111
let input = "4:spam".to_string();

examples/parser_string_in_vec_out.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! ```
66
//!
77
//! It prints "spam".
8-
use torrust_bencode2json::parsers::BencodeParser;
8+
use bencode2json::parsers::BencodeParser;
99

1010
fn main() {
1111
let input = "4:spam".to_string();

examples/parser_vec_in_string_out.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! ```
66
//!
77
//! It prints "spam".
8-
use torrust_bencode2json::parsers::BencodeParser;
8+
use bencode2json::parsers::BencodeParser;
99

1010
fn main() {
1111
let input = b"4:spam".to_vec();

examples/parser_vec_in_vec_out.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! ```
66
//!
77
//! It prints "spam".
8-
use torrust_bencode2json::parsers::BencodeParser;
8+
use bencode2json::parsers::BencodeParser;
99

1010
fn main() {
1111
let input = b"4:spam".to_vec();

examples/try_bencode_to_json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! ```not_rust
44
//! cargo run --example try_bencode_to_json
55
//! ```
6-
use torrust_bencode2json::try_bencode_to_json;
6+
use bencode2json::try_bencode_to_json;
77

88
fn main() {
99
let result = try_bencode_to_json(b"d4:spam4:eggse").unwrap();

0 commit comments

Comments
 (0)