Remove codec::Encode and codec::Decode derives from generated APIs by default (#2008)

* Remove codec::Encode and codec::Decode from generated APIs by default

* clippy fixes

* clippy

* More fixes, and CompactAs only if Encode/Decode

* revert println in example

* fix lightclient test

* fix docs

* Fix another rust doc comment

* Fix failing storage test

* Remove now-unnecessary test

* clippy

* clippy

* Remove pointless clone
This commit is contained in:
James Wilson
2025-05-29 14:43:42 +01:00
committed by GitHub
parent 0473cfd292
commit ed25a3ac26
22 changed files with 627 additions and 8974 deletions
+4 -5
View File
@@ -100,7 +100,8 @@ impl FileOrUrl {
Ok(bytes)
}
(Some(PathOrStdIn::StdIn), None, None) => {
let res = std::io::stdin().bytes().collect::<Result<Vec<u8>, _>>();
let reader = std::io::BufReader::new(std::io::stdin());
let res = reader.bytes().collect::<Result<Vec<u8>, _>>();
match res {
Ok(bytes) => Ok(bytes),
@@ -191,13 +192,11 @@ fn time_based_seed() -> u64 {
pub fn first_paragraph_of_docs(docs: &[String]) -> String {
// take at most the first paragraph of documentation, such that it does not get too long.
let docs_str = docs
.iter()
docs.iter()
.map(|e| e.trim())
.take_while(|e| !e.is_empty())
.collect::<Vec<_>>()
.join("\n");
docs_str
.join("\n")
}
pub trait Indent: ToString {