instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rust-cross__cargo-zigbuild__140 | rust-cross/cargo-zigbuild | 140 | defect | 1701ad072ac0dc942446a688f862b20da5ed350f | e5caa37044db7bc4403647289982e1a11bbcead0 | Robust bindgen support | It turned out that #74, which added bindgen support, was pretty much incomplete. For example the following C code will fail to compile during bindgen.
```c
#include <stdlib.h>
```
It should be noted that Zig contains multiple libc header files:
1. [`zig/lib/libc/glibc/include`](https://github.com/ziglang/zig... | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 96266ef7..45517eec 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -33,7 +33,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [1.63.0, stable, nightly]
- zig: [0.... | 1 | 1 | 0 | [{"id": "G0", "claim": "Drop the 0.9.0 Zig entry from the CI matrix because it has issues such as ziglang/zig#12046.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-cross__cargo-zigbuild__243 | rust-cross/cargo-zigbuild | 243 | defect | 8a76c1dbb0c6c704af599652d99545fde2ba6719 | 868ff3c60e5d9f6ec396e254bb9d99fad0483dee | Respect target-cpu in RUSTFLAGS | Partially resolve https://github.com/rust-cross/cargo-zigbuild/issues/241
1. in zigbuild command, target-cpu in the RUSTFLAGS (or local Cargo config files) is parsed and appended to the compiler wrapper.
For example, `RUSTFLAGS="-Ctarget-cpu=x86-64-v3"` will cause compiler wrapper to be `cargo-zigbuild zig cc ... | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 7c1a1c5e..b1613d5a 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -32,12 +32,12 @@ jobs:
fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
matrix:
os: [ubuntu-late... | 2 | 1 | 0 | [{"id": "G0", "claim": "Pre-built binaries should be released for this project (e.g. via cargo-dist) so tools like x86-instruction-set-analyzer do not have to be compiled from source on every GitHub Actions CI run.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id":... | null |
rust-cv__arrsac__10 | rust-cv/arrsac | 10 | defect | 32920d1f0420bbd0623c40eead14b9421ef83f0d | 3dbfaf70347abe026b3b4593183bac55558683db | Update `rand` dependencies | - update `rand_core`, `rand` to `0.9` and `rand_xoshiro` to `0.7`
- fix the new fallible constructor call for `Uniform::new` in tests
- make Clippy happy | diff --git a/Cargo.toml b/Cargo.toml
index 1f13adc..572a786 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,11 +13,11 @@ readme = "README.md"
[dependencies]
sample-consensus = "1.0.1"
-rand_core = "0.6.3"
+rand_core = "0.9"
[dev-dependencies]
-rand = "0.8.4"
-rand_xoshiro = "0.6.0"
+rand = "0.9"
+rand_xoshiro = ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The PR needs a `cargo fmt` run so that CI will pass.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
rust-db__refinery__175 | rust-db/refinery | 175 | defect | f824ac68022d1e933e737e8aa365b119eb394b97 | 6c1bf62cdc187a95a898715ea9d5f4b8f056614f | Removal of files option of the cli + dep upgrade + cs | Fixes #174 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a05f31d8..31edb2a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog
All notable changes to this project will be documented in this file.
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adhere... | 2 | 1 | 1 | [{"id": "G0", "claim": "References to the removed `files` subcommand still remain in refinery_cli/src/migrate.rs and the cli tests still use it, which is why the cli tests are failing.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The CLI should in... | null |
rust-db__refinery__207 | rust-db/refinery | 207 | defect | 561e215ff8178648c410eb974e99c179f80300a7 | 86c7e66ab6aaebd606ac42ae953d80c045bf313a | Added support for a custom migration table name | This PR adds support for a custom name for the migration table (by default `refinery_schema_history`).
## Motivation
I've seen quite some issues requesting this is one way or another:
- #205 (Maybe?)
- #123 (Maybe?)
- #109
## Approach
The PR adds a new field to the `Runner` struct, `migration_table_name` and... | diff --git a/refinery/tests/mysql.rs b/refinery/tests/mysql.rs
index 600950dd..0bfdf971 100644
--- a/refinery/tests/mysql.rs
+++ b/refinery/tests/mysql.rs
@@ -15,6 +15,8 @@ mod mysql {
use std::process::Command;
use time::OffsetDateTime;
+ const DEFAULT_TABLE_NAME: &str = "refinery_schema_history";
+
... | 4 | 4 | 0 | [{"id": "G0", "claim": "The stale TODO comment above assert_migrations_table_query in the tiberius driver can now be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Runner's default migration_table_name should be built with \"refinery_... | null |
rust-db__refinery__296 | rust-db/refinery | 296 | defect | 0118f0101b0e171498f965bf26e20d9b2072c4ff | 23ed213fd57dd123d9a916f92c8b4329de6be072 | Iterable run method | alternative to #293 w/o a runner-held connection handle
- adds `run_stepwise()` method returning an iterator over migrations
- refactors some migration code to reduce duplication between sync/async implementations and make handling of Target::Fake more consistent
| diff --git a/examples/main.rs b/examples/main.rs
index e63779e5..9b1fff15 100644
--- a/examples/main.rs
+++ b/examples/main.rs
@@ -9,3 +9,11 @@ fn main() {
let mut conn = Connection::open_in_memory().unwrap();
embedded::migrations::runner().run(&mut conn).unwrap();
}
+
+fn iter_main() {
+ let mut conn = C... | 7 | 7 | 0 | [{"id": "G0", "claim": "The commented-out `impl IntoIterator for Runner` block is not needed and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The public method should be named `iter` instead of `run_stepwise` (jxs) and the n... | null |
rust-diplomat__diplomat__1019 | rust-diplomat/diplomat | 1,019 | defect | b126ced05967031cf5c44e7b0bf74f8541c73de6 | b035f14b065b6cf0f138154abf6b343b6eee10b3 | Add Diplomat Feature gates | Closes https://github.com/rust-diplomat/diplomat/issues/1016
Very rough draft of the plan described above.
This currently does not implement warning/validation since that requires modifying the structure of the HIR attribute validator some (it needs access to `cfg(feature=)` from the AST), and I wanted to wait on... | diff --git a/tool/src/config.rs b/tool/src/config.rs
index 3d84624ae..eb1a774b0 100644
--- a/tool/src/config.rs
+++ b/tool/src/config.rs
@@ -1,5 +1,5 @@
use std::{
- collections::HashMap,
+ collections::{HashMap, HashSet},
path::{Path, PathBuf},
str,
};
@@ -23,6 +23,10 @@ pub struct SharedConfig {
... | 3 | 3 | 3 | [{"id": "G0", "claim": "The `disable_feature_gate_warnings` config knob (and the cfg-detection warnings it controls) should not be part of this MVP; the warnings design should be discussed separately.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `f... | null |
rust-diplomat__diplomat__1025 | rust-diplomat/diplomat | 1,025 | defect | fec71040165b3a098ccb022bc2d087b211de3942 | df7386547523f68334840f372eedbb733e270cb9 | Optional Args Support | Closes #1023.
Wanted to check that this implementation is a good idea. Currently `default_args()` is stored as a map from parameter names to strings, where the String is the default value. This value is then parsed into a `DefaultArgValue` enum and stored into the relevant `Param` as `default_value: Option<DefaultAr... | diff --git a/core/src/hir/attrs.rs b/core/src/hir/attrs.rs
index 12ca93ba09..ea3399a70a 100644
--- a/core/src/hir/attrs.rs
+++ b/core/src/hir/attrs.rs
@@ -66,6 +66,11 @@ pub struct Attrs {
/// Information on if a type declaration/impl block has custom bindings, and if so, what kind.
pub custom_extra_code: H... | 4 | 4 | 3 | [{"id": "G0", "claim": "Replace the typed sub-enum taxonomy (DefaultArgIntType/IntSize/Int128/FloatType) and the intermediate DefaultArgValueString with a simple DefaultArgValue (Bool, Char, Integer, Float) parsed directly from the literal, since the exact integer type is not needed.", "category": "design", "verdict": ... | null |
rust-diplomat__diplomat__1032 | rust-diplomat/diplomat | 1,032 | defect | 78cb5471c692d7ce18989410a6a0b73eeb7e576b | ff4ad563a74120c2f2488d84750199ac0f43f5c6 | Pre/Post Custom Extra Code Blocks | Closes #1031. | diff --git a/core/src/hir/attrs.rs b/core/src/hir/attrs.rs
index 73b724f0d..f350763ad 100644
--- a/core/src/hir/attrs.rs
+++ b/core/src/hir/attrs.rs
@@ -83,11 +83,18 @@ pub enum IncludeSource {
pub enum IncludeLocation {
/// An extension to the definition of the class (i.e., in C++, the .d.hpp file)
DefBlock... | 1 | 1 | 0 | [{"id": "G0", "claim": "Instead of adding a String field to DeclTemplate/etc for every new extra-code block, the extra code should be modeled as a C++-specific ExtraCode type that can gain fields (or the custom_extra_code value passed down and read in the template).", "category": "design", "verdict": "supported", "prio... | null |
rust-diplomat__diplomat__1091 | rust-diplomat/diplomat | 1,091 | defect | 89b3418b8b677b5e2bc50f062ec79c3e14c1011b | 85dd6a96ac5eaef218c38a94e54fe086c054394a | Create `supports=mutable_slices` | Closes #1090
TODOs:
- [x] Strip nanobind support
- [x] Update docs | diff --git a/feature_tests/js/api/Float64Vec.d.ts b/feature_tests/js/api/Float64Vec.d.ts
index 7f6100cf8..1cf61e3e5 100644
--- a/feature_tests/js/api/Float64Vec.d.ts
+++ b/feature_tests/js/api/Float64Vec.d.ts
@@ -22,8 +22,6 @@ export class Float64Vec {
get asSlice(): Array<number>;
- fillSlice(v: Array<numb... | 2 | 2 | 0 | [{"id": "G0", "claim": "The mutable-slice rejection should be implemented as a `supports` flag rather than a JS-backend-specific error, in case other backends need it.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "Nanobind's existing mutable-slice suppo... | null |
rust-diplomat__diplomat__1100 | rust-diplomat/diplomat | 1,100 | defect | 6559f95efa34658b9e801b45e39f1b306c32e249 | 1cf66b07db016b0009ebb2234cdbc492b0c49fa3 | fix panic for nanobind constructor overloading | Hi - thanks for the project! I was looking at generating python bindings for https://github.com/unicode-org/icu4x/tree/9b075f68940cdbf98139f4573e63249619d9b464/ffi
This tool uses diplomat to create those bindings. After setup, I saw the following issue:
## The Panic
The panic occurred in tool/src/nanobind/ge... | diff --git a/tool/src/nanobind/gen.rs b/tool/src/nanobind/gen.rs
index 2e078d2c8..3ad6b5e29 100644
--- a/tool/src/nanobind/gen.rs
+++ b/tool/src/nanobind/gen.rs
@@ -335,12 +335,17 @@ impl<'ccx, 'tcx: 'ccx> ItemGenContext<'ccx, 'tcx> {
e.def = info.def.clone(); // when a setter exists, u... | 3 | 3 | 1 | [{"id": "G0", "claim": "The method-overloading test (type and functions) should live in feature_tests instead of as a boilerplate-heavy inline test in tool/src/nanobind/mod.rs.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The fix should just group Nam... | null |
rust-diplomat__diplomat__1120 | rust-diplomat/diplomat | 1,120 | defect | 488716e899e5bab3f1d691baadb1b40a0858fa04 | 1c365032fa7b1544d8556692a073bab5f5e391ce | Nanobind Always Generates Structs as Mutable Referenceable | Closes https://github.com/rust-diplomat/diplomat/issues/1119
| diff --git a/book/src/backends/nanobind.md b/book/src/backends/nanobind.md
index fc066919b..66995afc4 100644
--- a/book/src/backends/nanobind.md
+++ b/book/src/backends/nanobind.md
@@ -36,6 +36,9 @@ These are Python classes bound to C++ through Nanobind.
#### Structs
These are Python classes, bound similarly to opaqu... | 1 | 1 | 0 | [{"id": "G0", "claim": "The doc comment on the new `structs_always_mut_ref` config option in CppConfig should mention nanobind as the backend that requires it.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-diplomat__diplomat__288 | rust-diplomat/diplomat | 288 | defect | bb949191c432e206a43084cb37462fe8fb7f1e18 | b49c6ab5a10e16395e3b5437ab0b27f6e7571354 | Hir improvements | Each commit is individual
This is mostly stuff I found myself wanting whilst working on https://github.com/rust-diplomat/diplomat/pull/286
Fixes for:
- Adding some abstractions around defs
- Making input/output types more generic so that it's possible to write shared code
- https://github.com/rust-diplo... | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 5de5ee29ee..5cc752f0ba 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -16,6 +16,13 @@ categories = ["development-tools"]
[lib]
path = "src/lib.rs"
+[features]
+# Enable the higher level IR
+hir = []
+
+[package.metadata.docs.rs]
+all-features = true
+
[de... | 2 | 1 | 0 | [{"id": "G0", "claim": "Consider whether the associated types of TyPosition should have dedicated trait bounds (like an Id and a Path trait), though the reviewer concedes it may be extremely overkill.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The na... | null |
rust-diplomat__diplomat__450 | rust-diplomat/diplomat | 450 | defect | bea7dfa361bd498ee06249c648c2180e93045680 | ea24d0795da4f3c1f76376fbdaad38abdf22a1aa | Add support for special methods | Progress on https://github.com/rust-diplomat/diplomat/issues/447
Does not yet use them in Dart/C++. Also doesn't touch iterators (#251) since that requires the type annotation to be a thing first. | diff --git a/core/src/ast/attrs.rs b/core/src/ast/attrs.rs
index 8e57638493..da9da0bd65 100644
--- a/core/src/ast/attrs.rs
+++ b/core/src/ast/attrs.rs
@@ -351,6 +351,9 @@ impl RenameAttr {
StandardAttribute::List(_) => {
Err("Failed to parse malformed #[diplomat::abi_rename(...)]: found li... | 5 | 5 | 1 | [{"id": "G0", "claim": "The SpecialMethod docs should document whether a `named_constructor` backend feature is wanted, since Dart has it but Java can only express named constructors through overloads.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Writi... | null |
rust-diplomat__diplomat__585 | rust-diplomat/diplomat | 585 | defect | 06043ef97bf4bcedef122a7836507a57288da684 | 9deca00fe589da773b2d21bf62af586ddaa856ff | Support diplomat::attr(auto) | Builds on top of https://github.com/rust-diplomat/diplomat/pull/584
This is the change I proposed in #563
This makes it clearer as to when the attribute is automatically deciding which backend to target, and brings back some error messages when you try and unconditionally force an unsupported attribute on a backe... | diff --git a/core/src/ast/attrs.rs b/core/src/ast/attrs.rs
index c898cc031..8993355c1 100644
--- a/core/src/ast/attrs.rs
+++ b/core/src/ast/attrs.rs
@@ -195,6 +195,8 @@ pub enum DiplomatBackendAttrCfg {
Any(Vec<DiplomatBackendAttrCfg>),
All(Vec<DiplomatBackendAttrCfg>),
Star,
+ // "auto", smartly figu... | 1 | 1 | 0 | [{"id": "G0", "claim": "The disable attributes in feature_tests/src/attrs.rs that still name explicit backends (e.g. MyIndexer's `any(c, cpp, js)` / `dart` disables) should also be recovered and expressed with the new mechanism, as all other `any(_)`s in the file were converted to `auto` / supports queries.", "category... | null |
rust-diplomat__diplomat__660 | rust-diplomat/diplomat | 660 | defect | 0183677b4bc25fc762ec06a4665c4f384998fb50 | 6871dc1236e4f0e60de1df86134cb8dde9680fb7 | Correctly handle padding in JS2 | This PR:
- Tracks the *type* of padding field, generating the right number of padding fields when the type is wider than i8 (fixes #656)
- Handles the edge case that scalar fields are passed as separate arguments without padding *unless found in a larger struct*. (fixes #657)
It also generally cleans up the pa... | diff --git a/example/js/lib/api/FixedDecimalFormatterOptions.mjs b/example/js/lib/api/FixedDecimalFormatterOptions.mjs
index 517eae22f..a26479f7a 100644
--- a/example/js/lib/api/FixedDecimalFormatterOptions.mjs
+++ b/example/js/lib/api/FixedDecimalFormatterOptions.mjs
@@ -33,11 +33,15 @@ export class FixedDecimalFormat... | 1 | 1 | 0 | [{"id": "G0", "claim": "The term \"scalar\" used for the scalar_count fields should be defined (in a comment) so readers know what it means.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-diplomat__diplomat__747 | rust-diplomat/diplomat | 747 | defect | f5384d4cb2d553c5fa328719c31b4e72a0c10e91 | 81f81f09f375b91a67eba28975ceb36b49b03428 | Fix kotlin unsigned type conversion | The type conversion on the FFI boundary was broken in Kotlin for unsigned types -- regular methods and trait methods need to be treated differently. This PR fixes the issue. | diff --git a/feature_tests/c/include/OpaqueMutexedString.h b/feature_tests/c/include/OpaqueMutexedString.h
index ee0c1039c..ffc9783b0 100644
--- a/feature_tests/c/include/OpaqueMutexedString.h
+++ b/feature_tests/c/include/OpaqueMutexedString.h
@@ -32,6 +32,8 @@ DiplomatStringView OpaqueMutexedString_dummy_str(const Op... | 2 | 2 | 0 | [{"id": "G0", "claim": "Add comments explaining why support_unsigned is false (i.e. why the flag is necessary) at the affected call sites.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the leftover commented-out `PrimitiveType::Bool => for... | null |
rust-diplomat__diplomat__765 | rust-diplomat/diplomat | 765 | defect | 22aa0436637544f78f8ce0f3e6300aec8dd40a0e | 82132cf30e3d715a934e80389b100058940c9ebd | Add support for nested namespaces for C++ | Adds support for using nested namespaces to the C/C++ generator. Nested namespaces are specified with the `::` separator syntax, ie "company::module::submodule". Filenames and include guards are updated so that multiple files with the same name in different namespaces don't conflict, which is a big part of the purpose ... | diff --git a/tool/src/cpp/formatter.rs b/tool/src/cpp/formatter.rs
index f9abef2f9..231a5e01a 100644
--- a/tool/src/cpp/formatter.rs
+++ b/tool/src/cpp/formatter.rs
@@ -56,6 +56,7 @@ impl<'tcx> Cpp2Formatter<'tcx> {
.rename
.apply(resolved.name().as_str().into());
if let Some(ref ns) ... | 1 | 1 | 1 | [{"id": "G0", "claim": "Diplomat aims to generate the same code regardless of the host platform, so the namespace separator in generated include paths should always be '/' (backslashes only via an opt-in config if ever wanted), not std::path::MAIN_SEPARATOR_STR, which makes the output depend on the host OS.", "category... | null |
rust-diplomat__diplomat__776 | rust-diplomat/diplomat | 776 | defect | a49588df87bc76a8eee2fc6767e84127375463ef | 0d6cbb8860d102c94266e1de4599a8df35a724e0 | Add flexible, extensible configuration infrastructure, with support for toml, CLI, and attr based config | Put config language in `tool/config.rs`, and it can currently be set through a `config.toml` file (which can be customized on the command line).
Some TODOs here:
- [x] Shared attributes (like `lib_name`)
- [x] Logic in Kotlin for overriding these shared attributes
- [x] Setting config options through the comm... | diff --git a/Makefile.toml b/Makefile.toml
index e65278fdc..56c87833d 100644
--- a/Makefile.toml
+++ b/Makefile.toml
@@ -443,7 +443,7 @@ script_runner = "@duckscript"
script = '''
exit_on_error true
!include_files ./support/functions.ds
-generate_generic feature_tests demo_gen demo "-l diplomat-demo-conf.toml"
+gene... | 3 | 3 | 3 | [{"id": "G0", "claim": "Config attributes should not be allowed on random types; they should be required to go on a top-level type in lib.rs.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Config attributes should not be available on the Attrs struct but... | null |
rust-diplomat__diplomat__796 | rust-diplomat/diplomat | 796 | defect | d9abfbf037a760f4ffcfaf68022a6025273377bb | 059922e57873a78b4b2e0ee96cadacf83595a120 | Add support for return static slices in JS and Dart | These are basically identical to owned slices for these backends (which convert the type) anyway. | diff --git a/feature_tests/c/include/MyString.h b/feature_tests/c/include/MyString.h
index ea59de3e0..2de543a81 100644
--- a/feature_tests/c/include/MyString.h
+++ b/feature_tests/c/include/MyString.h
@@ -27,6 +27,8 @@ void MyString_set_str(MyString* self, DiplomatStringView new_str);
void MyString_get_str(const MyS... | 1 | 1 | 1 | [{"id": "G0", "claim": "The generated Dart (and JS) code for a static-slice return calls `_toDart` with no lifetime edges, and `toDart` frees the backing memory when there are no edges, so the PR should either pass a `'static` dummy lifetime or change the `toDart` implementations.", "category": "correctness", "verdict"... | null |
rust-diplomat__diplomat__804 | rust-diplomat/diplomat | 804 | defect | 5c383d634b982a5f3199c0fee8421839f9582cfc | 195fd8499b13de054e3b4eb97f420e6e88df06d2 | Fix crash in JS backend when processing options-in-structs (#803) | - In general, when processing a `DiplomatOption` type, look at the inner type when looking at the allocator
- Add a test to ensure this situation doesn't crash `diplomat-tool`
- Reuse some of the test code from the Kotlin backend by moving it into `diplomat-tool`'s root
- Make the error message for a crash more desc... | diff --git a/tool/src/js/converter.rs b/tool/src/js/converter.rs
index f76d9e782a..7ae1ae6928 100644
--- a/tool/src/js/converter.rs
+++ b/tool/src/js/converter.rs
@@ -630,7 +630,10 @@ impl<'tcx> TyGenContext<'_, 'tcx> {
self.formatter.fmt_type_name(s.id()),
js_name,
st... | 1 | 1 | 1 | [{"id": "G0", "claim": "The options-in-structs regression test and the new test infrastructure added under tool/src/js/mod.rs and tool/src/tests.rs are unnecessary; this kind of test belongs in feature_tests (add cases to structs.rs and mention issue #803 there).", "category": "testing", "verdict": "supported", "priori... | null |
rust-diplomat__diplomat__809 | rust-diplomat/diplomat | 809 | defect | b431fdb4a8ee3d2168c732cb30f3125f401c1ff4 | 4cfd2a30d8256e4e5f60b1a9eaf4ce7e26d3f548 | Fix arithmetic operator overloads for structs | For structs & enums where it's impossible to define a function taking `&mut self`, define `[*]=` operators in terms of their immutable variants in the target language to allow good ergonomics.
| diff --git a/core/src/hir/attrs.rs b/core/src/hir/attrs.rs
index 7fe1737b8..d3632afaa 100644
--- a/core/src/hir/attrs.rs
+++ b/core/src/hir/attrs.rs
@@ -459,7 +459,10 @@ impl Attrs {
match method.output {
ReturnType::Infallible(_) => (),
... | 2 | 2 | 0 | [{"id": "G0", "claim": "The template variable misspells \"arithmetic\" as \"arithmatic\" and should be spelled correctly.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The *Assign error would ideally detect when the method is on a struct or enu... | null |
rust-diplomat__diplomat__843 | rust-diplomat/diplomat | 843 | defect | 00dba8a07fbe261e2d40291b293f88161cd471d1 | 3b23107d1c423f9bcace50e0dc41d7952a5baaca | Static Getter/Setter support for Python [#842] | Effectively Addresses what I wanted out of #842 (Though the 'custom code attribute' idea is definitely something we'll want down the road for some special cases) | diff --git a/feature_tests/cpp/include/StructArithmetic.d.hpp b/feature_tests/cpp/include/StructArithmetic.d.hpp
index 4a2a687a1e..097475ee2f 100644
--- a/feature_tests/cpp/include/StructArithmetic.d.hpp
+++ b/feature_tests/cpp/include/StructArithmetic.d.hpp
@@ -27,6 +27,10 @@ struct StructArithmetic {
int32_t x;
... | 2 | 2 | 2 | [{"id": "G0", "claim": "The static getter should be exposed as a separate static_getter attribute with its own static_accessor backend pref, available only in Python with the backend overriding the c++ setting.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim... | null |
rust-diplomat__diplomat__883 | rust-diplomat/diplomat | 883 | defect | 6e4b36d443134cba9e7fdfd84d3318e36659cd90 | 269aac709a8ed800501916dcec78da760904abce | Add support for default enum variants to C++ | Fixes https://github.com/rust-diplomat/diplomat/issues/247
Progress on https://github.com/rust-diplomat/diplomat/issues/882, potentially fixing it to the extent I think we need to.
Fixes https://github.com/rust-diplomat/diplomat/issues/271 by ensuring that all Diplomat types are safe to default-initialize if they ha... | diff --git a/core/src/hir/attrs.rs b/core/src/hir/attrs.rs
index 6cc43c8bd..e8c265c1a 100644
--- a/core/src/hir/attrs.rs
+++ b/core/src/hir/attrs.rs
@@ -44,6 +44,11 @@ pub struct Attrs {
/// This user-defined type can be used as the error type in a Result.
pub custom_errors: bool,
+ /// This user-defined... | 1 | 1 | 1 | [{"id": "G0", "claim": "Open a follow-up to require `#[default]` (or _maybe_ discriminant 0) for default enum variants, because implicitly defaulting to the first value in the generated C++ default constructor is bad.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-diplomat__diplomat__922 | rust-diplomat/diplomat | 922 | defect | e0616561536cbb0d675b0338789d01c83306cd41 | 4ab834c5ecd2c875d12a6408f86fa8fd4a5c28b2 | C++ Struct Refs | Closes #921 | diff --git a/core/src/hir/snapshots/diplomat_core__hir__type_context__tests__struct_ref_fails.snap b/core/src/hir/snapshots/diplomat_core__hir__type_context__tests__struct_ref_fails.snap
index 84e079de9..da59cb9a3 100644
--- a/core/src/hir/snapshots/diplomat_core__hir__type_context__tests__struct_ref_fails.snap
+++ b/c... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add comments explaining what the parameter-conversion code does, at this spot and below, since it is confusing.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
rust-diplomat__diplomat__928 | rust-diplomat/diplomat | 928 | defect | 9985e2042617d3cc88da0893636c6961855fd4a6 | fdb65766df1b5862bb71475ccdf7d3398571086b | Nanobind Overloading Support | Since we never know when an overload will happen (and all overloaded functions need to know their argument types), this requires us to call `gen_type_name` consistently for all functions, which may destroy some of the functionality Nanobind is trying to avoid.
I can either leave this as-is, or maybe we could re-fact... | diff --git a/feature_tests/cpp/include/ns/RenamedOpaqueArithmetic.d.hpp b/feature_tests/cpp/include/ns/RenamedOpaqueArithmetic.d.hpp
index 1d7ecf6d5..df7c65dba 100644
--- a/feature_tests/cpp/include/ns/RenamedOpaqueArithmetic.d.hpp
+++ b/feature_tests/cpp/include/ns/RenamedOpaqueArithmetic.d.hpp
@@ -29,6 +29,8 @@ class... | 4 | 3 | 2 | [{"id": "G0", "claim": "The nanobind generator re-uses a lot of code from the C++ backend; being able to use C++'s TyGenContext functions instead would make things easier and avoid breaking changes, though it would involve making much of the cpp module public.", "category": "design", "verdict": "uncertain", "priority":... | null |
rust-diplomat__diplomat__964 | rust-diplomat/diplomat | 964 | defect | 0fd371d03cb11866a87782762e3fd445e13a3800 | a1a62f316e804c885ecd19d435fc23061f03a176 | Add stable ABI C++ type for string view in slice | Fixes #963
This adds `diplomat::string_view_for_slice` to the c++ runtime which internally contains `DiplomatStringView` so has the right layout to pass over the ABI in a slice, at the downside of needing to use this type instead of `std::string_view` for this case.
This also adds an appropriate adapter to nanob... | diff --git a/example/cpp/include/diplomat_runtime.hpp b/example/cpp/include/diplomat_runtime.hpp
index 2f3a43d80..0068b1765 100644
--- a/example/cpp/include/diplomat_runtime.hpp
+++ b/example/cpp/include/diplomat_runtime.hpp
@@ -282,6 +282,68 @@ class span {
#endif // __cplusplus >= 202002L
+// An ABI stable std::... | 2 | 1 | 0 | [{"id": "G0", "claim": "The added Rust code is not rustfmt-formatted and needs reformatting.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer suggests the char-based capi_type selection (and the string_view_for_slice alias) may need t... | null |
rust-embedded-community__embedded-sdmmc-rs__103 | rust-embedded-community/embedded-sdmmc-rs | 103 | defect | dd8835c3a261947d8377628849df49162683c901 | 6c3fa0a7c13f72c62cf5747b590cdfb7b88c1766 | Smart Handles | `Volume`, `Directory` and `File` now hold `&mut VolumeManager`, which gives them methods and a `Drop` impl. Old functionality available with `RawVolume`, `RawDirectory` and `RawFile` because with the smart handles you can't open more than one file at once.
| diff --git a/Cargo.toml b/Cargo.toml
index 8bd40d42..e94d79e2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -21,9 +21,10 @@ log = {version = "0.4", default-features = false, optional = true}
env_logger = "0.9"
hex-literal = "0.3"
flate2 = "1.0"
-sha256 = "1.4"
+sha2 = "0.10"
chrono = "0.4"
[features]
default = ["... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request should add an entry about the Smart Handles change to the changelog.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-embedded-community__embedded-sdmmc-rs__106 | rust-embedded-community/embedded-sdmmc-rs | 106 | defect | 3b5c026dbae56644382a0fb1bd0d9ed1592c1d0b | bca6ceb9fc0da5b498c2c131a14ab69a1801b8d2 | Update embedded hal to 1.0.0 | This is based on [thejpster](https://github.com/rust-embedded-community/embedded-sdmmc-rs/commits?author=thejpster)'s Pull Request #103.
The changes are suprisingly trivial.
Except for one occasion, only where-clauses needed to be adjusted.
I need to work with an ESP32C6, which has already updated to this vers... | diff --git a/Cargo.toml b/Cargo.toml
index e94d79e2..20322ce2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,16 +13,17 @@ version = "0.6.0"
[dependencies]
byteorder = {version = "1", default-features = false}
defmt = {version = "0.3", optional = true}
-embedded-hal = "0.2.3"
+embedded-hal = "1.0.0"
heapless = "0.7... | 4 | 3 | 2 | [{"id": "G0", "claim": "The embedded-hal 1.0 SpiDevice contract (the SpiDevice impl owns the CS pin and must assert/deassert it around every transaction) is incompatible with the SdCard signature that also expects the CS pin separately in order to clock with CS deasserted, so the library should encourage passing a Dumm... | null |
rust-embedded-community__embedded-sdmmc-rs__112 | rust-embedded-community/embedded-sdmmc-rs | 112 | defect | 3b5c026dbae56644382a0fb1bd0d9ed1592c1d0b | a097eeb67b66bf9a9f58acc394838e7be3420b29 | Enhanced shell example | The shell example now supports some relative paths and some new commands. | diff --git a/examples/shell.rs b/examples/shell.rs
index 433fb3a1..751ce537 100644
--- a/examples/shell.rs
+++ b/examples/shell.rs
@@ -1,15 +1,180 @@
//! A simple shell demo for embedded-sdmmc
//!
-//! Presents a basic command prompt which implements some basic MS-DOS style shell commands.
+//! Presents a basic comma... | 2 | 2 | 1 | [{"id": "G0", "claim": "The module doc says volumes are given labels from `A:` to `C:` although the example mounts and labels four volumes (A-D).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The example's help text and doc comments use `1:` (and... | null |
rust-embedded-community__embedded-sdmmc-rs__121 | rust-embedded-community/embedded-sdmmc-rs | 121 | defect | ba27644a08a2b0eb8a4259af0b7c29b86e08b065 | 10d9e458ba1758728cbc12baf5a6c210cd3db464 | Adds flush API | Adds the ability to manually flush/commit written data to the directory entry, as discussed in #98. | diff --git a/src/filesystem/files.rs b/src/filesystem/files.rs
index 31fc9666..ad879f00 100644
--- a/src/filesystem/files.rs
+++ b/src/filesystem/files.rs
@@ -1,6 +1,6 @@
use crate::{
filesystem::{ClusterId, DirEntry, SearchId},
- RawVolume, VolumeManager,
+ Error, RawVolume, VolumeManager,
};
/// Repre... | 4 | 4 | 2 | [{"id": "G0", "claim": "The new flush function should be put in the existing impl block above instead of a separate impl block.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment should say the file is identified by the given raw fil... | null |
rust-embedded-community__embedded-sdmmc-rs__143 | rust-embedded-community/embedded-sdmmc-rs | 143 | defect | 011726bf85edfd1315732746ccb1d9c5c7fec5b4 | 94f22465dbcbf1101b22a9e9e7a6edc8405f82f5 | Use a RefCell to provide interior mutability for VolumeManager. | VolumeManager now contains a RefCell, so all the methods can be `&self`. This also means you can have multiple smart handles usable at the same time.
Note that VolumeManager is !Sync, so this is just about having multiple `File` objects active at one time.
Closes #79 (finally!)
| diff --git a/README.md b/README.md
index 41985d25..eace6f8c 100644
--- a/README.md
+++ b/README.md
@@ -17,16 +17,16 @@ let sdcard = embedded_sdmmc::SdCard::new(sdmmc_spi, delay);
println!("Card size is {} bytes", sdcard.num_bytes()?);
// Now let's look for volumes (also known as partitions) on our block device.
// T... | 2 | 2 | 1 | [{"id": "G0", "claim": "Use try_borrow_mut and return an appropriate error when the RefCell is already borrowed, at every borrow_mut call site in volume_mgr.rs (not just this one), because borrow_mut may panic, e.g. if the filesystem API is re-entered from inside a directory iterator.", "category": "correctness", "verd... | null |
rust-embedded-community__embedded-sdmmc-rs__189 | rust-embedded-community/embedded-sdmmc-rs | 189 | defect | a17e0bc08def6b05a59994e7c59c554161deae31 | 1b5c28fd7856bf35e80e06af071f998094597d31 | fix seek and write to block start zeros rest of block after written data (#188) | Fix for #188 where seeking to offset of block size multiple and then writing, writes the data and zero the leftover of the block size instead of keeping the data that was there.
Includes also test for seek+write at both offset that worked and offset that didn't work. | diff --git a/src/volume_mgr.rs b/src/volume_mgr.rs
index de34a911..c2aec0a8 100644
--- a/src/volume_mgr.rs
+++ b/src/volume_mgr.rs
@@ -878,7 +878,9 @@ where
Err(e) => return Err(e),
};
let to_copy = core::cmp::min(block_avail, bytes_to_write - written);
- let block ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The whole-block condition should be rewritten so that a block is blanked without reading when block_offset is 0 and the write replaces the whole valid contents (to_copy == block_avail), instead of reading whenever the current offset is below the file size.", "category": "performance", "verdict":... | null |
rust-embedded-community__embedded-sdmmc-rs__210 | rust-embedded-community/embedded-sdmmc-rs | 210 | defect | c629f38d1cde6ba1f04ad164f97d22363b2917b4 | cf1eca07a87fdd9f1c3316c25c1b0947539c9194 | Support directory deletion | Fix https://github.com/rust-embedded-community/embedded-sdmmc-rs/issues/186.
The changes to the `Error` enum would be a breaking change. The new variant can either be only added, leaving behind a variant that will never be constructed or replaced. | diff --git a/src/lib.rs b/src/lib.rs
index e8ebbab8..eaab01d5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -191,8 +191,10 @@ where
OpenedDirAsFile,
/// You can't open a file as a directory
OpenedFileAsDir,
- /// You can't delete a directory as a file
+ /// You can't delete a directory as a file [no ... | 2 | 2 | 1 | [{"id": "G0", "claim": "Deleting a directory that is already open should be rejected instead of silently leaving a dangling open-directory entry.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new clone of the open-directory entry is unnecessary... | null |
rust-embedded-community__embedded-sdmmc-rs__216 | rust-embedded-community/embedded-sdmmc-rs | 216 | defect | 7b13b7b4bc7e78675886e60e57ec3e2c1b6e4a9c | 1c55c66b33de6f8e7c19b8fa745f124bae965755 | Documentation updates | Updates documentation for `VolumeManager`, `Directory` and `File` to add missing details.
Also removes an unused `Error` variant, and renames `delete_file_in_dir` to `delete_entry_in_dir`.
This is a breaking change.
| diff --git a/examples/delete_file.rs b/examples/delete_file.rs
index 3df1978e..25493c6e 100644
--- a/examples/delete_file.rs
+++ b/examples/delete_file.rs
@@ -36,7 +36,7 @@ fn main() -> Result<(), Error<std::io::Error>> {
let volume = volume_mgr.open_volume(VolumeIdx(0))?;
let root_dir = volume.open_root_dir(... | 1 | 1 | 0 | [{"id": "G0", "claim": "The pull request should add an entry to the changelog.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}] | null |
rust-embedded-community__embedded-sdmmc-rs__217 | rust-embedded-community/embedded-sdmmc-rs | 217 | defect | faf3e0dbd2c008377dee4d877f801b9ec0acb633 | 99cc7cbc19475466b2f9d3d9aecd8541ec330bcd | Support opening files by long file name | Adds a new API which lets you open files by their long file name.
Does not (currently) let you open directories in this manner, nor does it let you create files with a long file name.
Builds on #216 | diff --git a/examples/list_dir.rs b/examples/list_dir.rs
index e12807af..368c38db 100644
--- a/examples/list_dir.rs
+++ b/examples/list_dir.rs
@@ -79,6 +79,7 @@ fn list_dir(directory: Directory<'_>, path: &str) -> Result<(), Error> {
{
children.push(entry.name.clone());
}
+ embedde... | 2 | 2 | 1 | [{"id": "G0", "claim": "Add an entry to the changelog for this pull request's changes.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The directory iterator callback should be expected to return the standard core::ops::ControlFlow type rather than... | null |
rust-embedded-community__embedded-sdmmc-rs__23 | rust-embedded-community/embedded-sdmmc-rs | 23 | defect | bbf6da4c84691ee6c6a32b56f2288c79d40bf00d | 866fb80431482e3a49e5ec946b298461b0f04f0c | Add support for file deletion | Add support for file deletion, also added an accompanying test for the file deletion.
Added disk.img to .gitignore to prevent accidental commits | diff --git a/.gitignore b/.gitignore
index 69369904..21eb0786 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/target
**/*.rs.bk
Cargo.lock
+disk.img
diff --git a/examples/delete_test.rs b/examples/delete_test.rs
new file mode 100644
index 00000000..ae48c14b
--- /dev/null
+++ b/examples/delete_test.rs
@@ -0... | 3 | 3 | 1 | [{"id": "G0", "claim": "The FAT16 delete path writes a freshly zeroed block with only the first byte set to 0xE5 instead of modifying the leading byte of the matched directory entry, destroying the other directory entries in that block.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "in... | null |
rust-embedded-community__embedded-sdmmc-rs__59 | rust-embedded-community/embedded-sdmmc-rs | 59 | defect | db58253bb326d20e177c733ebc0b051ef0dcee0f | ecc51b81139e6379a109c5dc6428ef939903785f | Customisable maximum number of open directories and files | Within my embedded app I require multiple data streams to multiple files, greater than the default supported amount which is currently `4`.
This PR simply allows customization of the maximum allowed open directories and files by replacing the hardcoded constants `MAX_OPEN_DIRS` and `MAX_OPEN_FILES` with const generi... | diff --git a/examples/create_test.rs b/examples/create_test.rs
index c9ee6df1..eb2e4102 100644
--- a/examples/create_test.rs
+++ b/examples/create_test.rs
@@ -118,7 +118,7 @@ fn main() {
.map_err(Error::DeviceError)
.unwrap();
println!("lbd: {:?}", lbd);
- let mut controller = Controller::new(... | 3 | 3 | 2 | [{"id": "G0", "claim": "There is still a failing test on this pull request that needs to be fixed.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Add documentation explaining that the maximum numbers of open directories and files are configurable an... | null |
rust-embedded-community__embedded-sdmmc-rs__69 | rust-embedded-community/embedded-sdmmc-rs | 69 | defect | a33b10f6f1c25df663290b90429f4e1fd1c91cc0 | 532fa5267cef8ddf6f99742d959ce2bf359b0b08 | Allow constructing a Controller without specifying generic parameters | Fixes #61 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 787d0b12..6b78c008 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changes
- Add `MAX_DIRS` and `MAX_FILES` generics to `Controller` to allow an arbitrary numbers of con... | 2 | 2 | 0 | [{"id": "G0", "claim": "Move both unreleased changelog entries into the Version 0.4.0 section.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The unreleased section is not used correctly: the whole 0.4.0 section should only be created at release t... | null |
rust-embedded__cortex-m__447 | rust-embedded/cortex-m | 447 | defect | 4e908625204a1e95dd3fd5bdcd8d66d6bc11c3bc | 4453ebb94abf0d2461bf34794f653209169c86b6 | Add implementation for critical-section 1.0 | Picking up #433 since it seems stalled. Changes from #433 are:
- Update to `critical-section 1.0.0-alpha.2`
- Use `bool` restore token
- Name Cargo feature `critical-section-single-core`.
TODO before merging:
- [x] Wait for `critical-section 1.0` release https://github.com/rust-embedded/critical-section/pull/1... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index aa88a56c..0d9b2b46 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,6 +29,6 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- name: Run tests
- run: cargo test --all --exclude cort... | 3 | 3 | 1 | [{"id": "G0", "claim": "Changing the clippy workflow trigger from `pull_request_target` to `pull_request` (and removing the conditional checkout steps) looks like an accidental rebase mistake and may stop the clippy annotations working since the secret key becomes unavailable.", "category": "correctness", "verdict": "s... | null |
rust-embedded__embedded-alloc__102 | rust-embedded/embedded-alloc | 102 | defect | dd4391d23c1fd97c974f02b5f3caa339e66b7e48 | 8cf2418c743407b9eee865e1ba6d870a848d1aa3 | Change to &raw | Closes #101
Replaces macro usage and updates docs.
Note this does not touch the crate itself, just docs and examples.
Thanks. | diff --git a/README.md b/README.md
index 5eb6cde..a1022f4 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,6 @@ Starting with Rust 1.68, this crate can be used as a global allocator on stable
extern crate alloc;
-use core::ptr::addr_of_mut;
use cortex_m_rt::entry;
use embedded_alloc::LlffHeap as Heap;
@@ -3... | 2 | 2 | 0 | [{"id": "G0", "claim": "The plain local array in test_allocator_api should have its heap initialized with `heap_mem.as_mut_ptr()` instead of `&raw mut heap_mem`, since it is not a `static mut` so `&raw` is unnecessary and pointers obtained like the old `.as_ptr()` are not allowed for writing.", "category": "correctness... | null |
rust-embedded__embedded-alloc__78 | rust-embedded/embedded-alloc | 78 | defect | 5654f2a033bfc94b415b93388c83464d684573bd | 14e70c1f3b776ade36c2d8e1f9e37238f94a7fcb | Add choice of Two-Level Segregated Fit and Linked List First Fit | This adds a feature choice of 'tlsf' or 'llff' to choose the global heap allocator implementation provided either by the current linked_list_allocator or rlsf.
This allows a user the crate to directly compare the two implementations by flipping the feature flag as long as the linked list free and used interface are ... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ff2e225..7318f2f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,9 +24,8 @@ jobs:
with:
targets: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- - run: cargo check --target=${... | 1 | 1 | 1 | [{"id": "G0", "claim": "The mutually exclusive tlsf/llff features should be avoided by implementing each allocator as a separate struct instead of one struct that conditionally implements either.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-embedded__heapless__136 | rust-embedded/heapless | 136 | defect | fe1e56c1e95a66fbf60b5dadc939a2a858b31e24 | 46cf553acff16176d832ad656e3c5c64a802e308 | add the HistoryBuffer type | Closes #112
Unfortunately `const` construction won't work since the `Default` or `Clone` bound on `T` can't be used then, so I've not added an internal type to `i.rs`.
Let me know if you think any other traits should be implemented... | diff --git a/src/histbuf.rs b/src/histbuf.rs
new file mode 100644
index 0000000000..b10dab607f
--- /dev/null
+++ b/src/histbuf.rs
@@ -0,0 +1,325 @@
+use generic_array::{ArrayLength, GenericArray, sequence::GenericSequence};
+use as_slice::{AsSlice, AsMutSlice};
+
+/// A "history buffer", similar to a write-only ring bu... | 4 | 4 | 1 | [{"id": "G0", "claim": "Add inherent as_slice and as_mut_slice methods so that hb.as_slice() works without importing the AsSlice trait.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove first, last, iter, iter_mut, and len (or rename len to capacity)... | null |
rust-embedded__heapless__153 | rust-embedded/heapless | 153 | defect | 3d20301aecd494c518b403c9f2eadb572c30ff1d | b5c0b46240bceba6a6b679a84a1603ae782073d9 | x86_64: "practically" thread-safe Pool | ### Summary / motivation
this PR makes `Pool` `Sync` on x86_64 with the main goal of being able to test `no_std` code that uses `Pool` (e.g. via the singleton `pool!` macro) on x86_64 (as it's not straight forward to run tests on embedded devices, and even less to CI those tests).
### Details
this PR reduces t... | diff --git a/ci/script.sh b/ci/script.sh
index e235fa266b..48f9acff76 100644
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -17,7 +17,6 @@ main() {
if [ $TRAVIS_RUST_VERSION = nightly ]; then
export RUSTFLAGS="-Z sanitizer=thread"
- export RUST_TEST_THREADS=1
export TSAN_OPTION... | 4 | 4 | 2 | [{"id": "G0", "claim": "The blanket `#![allow(warnings)]` marked FIXME in src/lib.rs should be fixed so the crate denies warnings again.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Documentation is missing for the new pool modules (src/pool/c... | null |
rust-embedded__heapless__624 | rust-embedded/heapless | 624 | defect | db26571bef6a9a1cf916404fee39b247cf269329 | 0c69fac1ede6be256ad573f28ba360d57f507abb | Document #583 and deprecate `mpmc` | This follows the wg meeting conclusions of 28/10/2025 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 26930e577c..0d452dd849 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Added `truncate` to `Deque`
- Added `retain` to `Deque`
- Added `retain_mut` to `Deque`
+- Deprecate `mpmc` (se... | 2 | 2 | 0 | [{"id": "G0", "claim": "The comment lines touched by this PR should also be kept under 100 characters.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Automate the comment line limit by enabling nightly rustfmt with comment_width = 100 in the project's .ru... | null |
rust-embedded__msp430-rt__26 | rust-embedded/msp430-rt | 26 | defect | 258b6cfdf5e50945b5eedb1556ce0e58b36aa5c7 | d503be1510d0a179fa26b1b81762e4cbefc2456d | Update CI | Fixes the broken CI, and accepts minor changes to error outputs that have occurred while the CI has been broken.
The `macro` workspace inherited the `msp430-none-elf` target from `.cargo/config.toml`, which caused some issues. To get around this we override that by invoking the test suite with `--target=x86_64-unkno... | diff --git a/.github/workflows/test-macro.yml b/.github/workflows/test-macro.yml
index f789559..1cfed40 100644
--- a/.github/workflows/test-macro.yml
+++ b/.github/workflows/test-macro.yml
@@ -16,10 +16,10 @@ jobs:
with:
profile: minimal
toolchain: nightly
- override: true
+ ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The `runs-on` line in the macro test workflow needs to be changed to a more recent Ubuntu version before the PR can be approved.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}] | null |
rust-embedded__svd2rust__199 | rust-embedded/svd2rust | 199 | defect | 5daaac3f1f280f5e25db0b2584ed04ade0d44116 | f6b13f0ed9b29b7dc0ab872ac2e380ed50c732cf | Improve ci | This enables rustfmt, makes seeing what errors happened during `cargo check` easier and some minor other changes. | diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8e82018f..0c203920 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,4 +14,4 @@ regress:nightly:
- cargo build --release
- cd ci/svd2rust-regress
- rm -rf ./output
- - cargo run --release -- --long-test
+ - cargo run --release -- --long-test ... | 2 | 2 | 1 | [{"id": "G0", "claim": "Clean up the FIXME on the rustup-rustfmt detection before merging: capture the command's error and assure its exit status is 0 instead of ignoring both.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Address the added TODO th... | null |
rust-embedded__svd2rust__401 | rust-embedded/svd2rust | 401 | defect | 27e3d3f5cda262b3ee92398c53e9b791db7b9125 | 9f4b0a357f83323165a7ab29cb2e811035f2f9a8 | MSP430 Improvements | This PR brings MSP430 PAC generation up to parity with Cortex M PAC generation. Among other things, a `device.x` file is now generated for each MSP430 PAC, and the `interrupt!` macro has been replaced with an attribute macro from the not-yet-published `msp430-rt v0.2.0`.
The remaining changes are docs and cleanups ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3be765730..adb0fbbd9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
+## [v0.17.0] - 2019-12-32
+
+### Changed
+
+- [breaking-change] Among other cleanups, MSP430 crat... | 6 | 3 | 1 | [{"id": "G0", "claim": "The pull request's MSP430 changes break svd2rust-regress: the architecture handling in svd_test.rs (L184) needs to be done for MSP430 and the cortex-m-only branch (L176) needs to be factored out.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G... | null |
rust-embedded__svd2rust__896 | rust-embedded/svd2rust | 896 | defect | 0e2aa424e0033c5b21b8ddec780db4af81959d1e | d66f55c8b0ed3372ea063cfe438f5a468d5f7a7e | Svd2rust regress fixes | I used this to test a fix for https://github.com/rust-embedded/svd2rust/issues/895
I fixed a lot of failing tests, however some of them are still failing. I can open an issue for that. | diff --git a/ci/svd2rust-regress/README.md b/ci/svd2rust-regress/README.md
index 5c623cc75..328260b7d 100644
--- a/ci/svd2rust-regress/README.md
+++ b/ci/svd2rust-regress/README.md
@@ -40,36 +40,11 @@ If all test cases passed, the return code will be `0`. If any test cases failed,
### Options
-Here are the options... | 4 | 3 | 0 | [{"id": "G0", "claim": "The README's run instructions should use the `cargo regress` alias (e.g. `cargo regress --help`) instead of `cargo run --release -- ...`, since specifying `--release` is unnecessary.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl... | null |
rust-fuzz__afl.rs__348 | rust-fuzz/afl.rs | 348 | defect | 57eb74d7cff583ea2503caf7718f544f3f7c0bfa | 06f81955aa72c1195b9a81ff6d24d1a6e88ddde2 | Add transitional message | This PR implements a transitional message as described in #335.
Essentially, users should now be able to install the `cargo-afl` binary with either of the following commands:
```sh
cargo install afl # old command
cargo install cargo-afl # new command
```
However, using the old command now produces the fol... | diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 73b38d674..860366997 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -33,6 +33,7 @@ jobs:
fail-fast: false
matrix:
environment: [ubuntu-latest, macos-latest]
+ package: [afl, cargo-afl]
... | 2 | 1 | 0 | [{"id": "G0", "claim": "The transitional warning should also suggest running `cargo uninstall afl`, unless the new `cargo-afl` install would clobber the old one anyway.", "category": "documentation", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The warning's first line should r... | null |
rust-fuzz__afl.rs__471 | rust-fuzz/afl.rs | 471 | defect | 462eff52b3c3ed9c3ea6f75d7cd9fbe66cab3949 | eb135dd7a0178e2e883aaeb2dca612f1ad52a1eb | Add `AFL_NO_CFG_FUZZING` test | Fixes https://github.com/rust-fuzz/afl.rs/issues/403
Hope this works! Just did a simple program like `hello.rs` and a test where the new `cfg.rs` is built using the `AFL_NO_CFG_FUZZING=1`. The new integration test takes a little longer to run (than the other integration test) cause the build command seems to work. | diff --git a/afl/examples/cfg.rs b/afl/examples/cfg.rs
new file mode 100644
index 000000000..9c8049124
--- /dev/null
+++ b/afl/examples/cfg.rs
@@ -0,0 +1,9 @@
+#![allow(clippy::manual_assert)]
+
+fn main() {
+ afl::fuzz!(|n: u8| {
+ if n == 100 && !cfg!(fuzzing) {
+ panic!("Crash!");
+ }
+ ... | 3 | 3 | 0 | [{"id": "G0", "claim": "Move the `.env(\"AFL_NO_CFG_FUZZING\", \"1\")` call after the `arg` calls so as not to split them.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the `- 1` adjustment for README.txt and make the check `crashes >= 1... | null |
rust-fuzz__afl.rs__697 | rust-fuzz/afl.rs | 697 | defect | 25b7e934dcc5008615c7eea9cc711c82e78e15c1 | 86f96c8f5a21c8925bef12aba6bc9824278e83cd | Add `fuzz_with_reset!` macro for resettable state in persistent mode | ## Summary
Adds `fuzz_with_reset!` macro that accepts a reset closure called after each iteration in AFL++ persistent mode. This addresses the stability drop caused by static initialization (`OnceLock`, `lazy_static`, `once_cell::Lazy`) that only executes on the first iteration.
Replaces the removed `reset_lazy_s... | diff --git a/README.md b/README.md
index 5eb55728f..a6e775570 100644
--- a/README.md
+++ b/README.md
@@ -52,6 +52,38 @@ environment variable `AFL_NO_CFG_FUZZING` to `1` when building.
[AFLplusplus]: https://aflplus.plus/
[rust]: https://www.rust-lang.org
+## Resettable State (`fuzz_with_reset!`)
+
+AFL++ persistent... | 10 | 10 | 3 | [{"id": "G0", "claim": "Move `fuzz_body` below `main` in afl/examples/reset_demo.rs so the code reads top-down.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `reset()` call added to the non-persistent (`__afl_fuzz_ptr.is_null()`) branch of ... | null |
rust-fuzz__arbitrary__101 | rust-fuzz/arbitrary | 101 | defect | d0d238d880276fd617c38f7e4712bf40db58aad6 | 9088544908993d86dd46ea6bb0be1eb32b27b0dc | Document size_hint() and fix implementations | This fixes #100. | diff --git a/src/lib.rs b/src/lib.rs
index 7b791ab..35d5ed0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -202,6 +202,16 @@ pub trait Arbitrary<'a>: Sized {
/// default with a better implementation. The
/// [`size_hint`][crate::size_hint] module will help with this task.
///
+ /// ## Invariant
+ ///
... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add comments to the `checked_arbitrary` test helpers describing what they do for future code readers.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-fuzz__arbitrary__110 | rust-fuzz/arbitrary | 110 | defect | 282fb0ec18e642a29972d646862ee700a574e8c3 | b3a3ef0b1311670f16e96f0f32e4a37fb31023d7 | fix rust-analyzer incorrect-ident-case diagnostic | Using the derive macro in a project with rust-analyzer gives an error complaining that this generated code isn't in the SCREAMING_SNAKE_CASE form. This change makes this diagnostic message go away.
The exact output of `rust-analyzer`:
```text
processing crate: playground, module: /home/charles/science/rust/playg... | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index 938258c..b564b54 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -18,6 +18,7 @@ repository = "https://github.com/rust-fuzz/arbitrary"
documentation = "https://docs.rs/arbitrary/"
[dependencies]
+heck = "0.4"
proc-macro2 = "1.0"
quote = "1.0"
syn ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The reviewer questions whether adding the heck dependency just to rename the generated counter identifier is worth it and suggests avoiding the dependency (e.g. simply using .toUppercase(), or as raised later in the thread, just #[allow]-ing the lint) since the code is generated.", "category": "... | null |
rust-fuzz__arbitrary__129 | rust-fuzz/arbitrary | 129 | defect | 3c0dc199a7bbdf69c5d006692ed973e43cfb7fe6 | 193341afb5a50bdbd48801a05e7d18a0aae51dba | Support customization of fields on derive | This PR addresses https://github.com/rust-fuzz/arbitrary/issues/33 and enables the following syntax for derive:
```rust
#[derive(Arbitrary)]
pub struct Rgb {
// set `r` to Default::default()
#[arbitrary(default)]
pub r: u8,
// set `g` to 255
#[arbitrary(value = 255)]
pub g: u8,
... | diff --git a/README.md b/README.md
index 38bd949..e5522dc 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,31 @@ pub struct Rgb {
}
```
+### Customizing single fields
+
+This can be particular handy if your structure uses a type that does not implement `Arbitrary` or you want to have more customization for parti... | 7 | 7 | 5 | [{"id": "G0", "claim": "The attribute should allow the syntax `#[arbitrary(value = 255)]` by passing any RHS tokens through, which should also make the `parse_assigned_value` function unnecessary.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Compile-fa... | null |
rust-fuzz__arbitrary__138 | rust-fuzz/arbitrary | 138 | defect | d38b015af522ca1b43c14d4765f7eeb27545c00a | 8bec07f3b3ffc1982deb80150418b3b7fd9b6971 | Allow trait bounds to be manually specified | While working with some generic types I found that the `T: Arbitrary` bounds added by `arbitrary_derive` were too restrictive.
Consider a trait that requires `Arbitrary`, like this:
```rust
pub trait WrapperTrait: for<'a> Arbitrary<'a> {}
```
And a struct that uses it:
```rust
#[derive(Arbitrary)]
struc... | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index f1c8b5c..d67dbe8 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -21,7 +21,7 @@ rust-version = "1.63.0"
[dependencies]
proc-macro2 = "1.0"
quote = "1.0"
-syn = { version = "1.0", features = ['derive'] }
+syn = { version = "1.0", features = ['derive',... | 7 | 6 | 2 | [{"id": "G0", "claim": "The pull request should not depend on `darling` (no bound on it), to keep the crate small.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "unclear"}, {"id": "G1", "claim": "The reviewers were not convinced the manual-bounds feature is worth supporting at all,... | null |
rust-fuzz__arbitrary__185 | rust-fuzz/arbitrary | 185 | defect | 17647a131b4b9e01d59d0783f9f4ede80d589179 | d1a7282c260701b32c53047affbc82095b792fa8 | Add faillible version of size_hint to properly handle recursive structures | The default implementation forwards to the current size_hint, so that it can be relied upon also for structures that still use the default implementation.
The default implementation of `size_hint` is not changed, so that it does not break existing implementations
Fix #144 | diff --git a/derive/src/lib.rs b/derive/src/lib.rs
index 9aec119..6b57489 100644
--- a/derive/src/lib.rs
+++ b/derive/src/lib.rs
@@ -364,17 +364,17 @@ fn gen_size_hint_method(input: &DeriveInput) -> Result<TokenStream> {
determine_field_constructor(f).map(|field_constructor| {
matc... | 9 | 4 | 0 | [{"id": "G0", "claim": "The recursive size_hint calls may not be inlined by LLVM in all optimization profiles, so the author was asked to try adding #[inline(always)] to the derived size_hint methods to see if that avoids having to complicate the trait interface any further.", "category": "performance", "verdict": "opp... | null |
rust-fuzz__arbitrary__20 | rust-fuzz/arbitrary | 20 | defect | 3741e0958c6fe35978625da08dc385fc9423f173 | 10d80bedcd25fe6e7db1d6496be0f8363440e77c | A bunch of stuff | r? @Manishearth
This is everything in #19 other than a better `Arbitrary for String` implementation, which I'm not super confident about implementing in a smart way. @Manishearth would you be up for doing that? Or outlining how you think that should be done?
Fixes #10 | diff --git a/src/finite_buffer.rs b/src/finite_buffer.rs
new file mode 100644
index 0000000..3db7ff2
--- /dev/null
+++ b/src/finite_buffer.rs
@@ -0,0 +1,74 @@
+// Copyright © 2019 The Rust Fuzz Project Developers.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licens... | 1 | 1 | 1 | [{"id": "G1", "claim": "The rewritten `Arbitrary for char` implementation using `int_in_range` seems slower than the old one and consumes bytes as an incoherent 'utf24' rather than utf32 (or utf8 if variable length is wanted), so the char changes should be removed.", "category": "design", "verdict": "supported", "prior... | null |
rust-fuzz__arbitrary__31 | rust-fuzz/arbitrary | 31 | defect | 8fa099d18703d71a7b37c9c4bb90db110eb7aa36 | 3ec56d124f4f308d1d714a17fa136b7bde38de1f | Add a `depth` parameter to `size_hint` to avoid infinite recursion | Note that the implementations of `size_hint` only need to increment the depth at indirection points where recursion can happen, e.g. at a `Box`. We take advantage of this in the impls for `std` types, but conservatively do not take advantage of that in the custom derive, since it doesn't have the necessary info.
Fix... | diff --git a/derive/src/lib.rs b/derive/src/lib.rs
index 925718c..df999ed 100644
--- a/derive/src/lib.rs
+++ b/derive/src/lib.rs
@@ -74,13 +74,31 @@ fn gen_size_hint_method(s: &Structure) -> TokenStream {
let tys = v.ast().fields.iter().map(|f| &f.ty);
sizes.push(quote! {
arbitrary::size_... | 1 | 1 | 1 | [{"id": "G0", "claim": "The recursion_guard wrapper is unnecessary for the collection `size_hint` impls such as `BinaryHeap`, since they never call `A::size_hint` and just lazily provide a minimum bound of 0 (plus `usize`).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-fuzz__arbitrary__42 | rust-fuzz/arbitrary | 42 | defect | 770c3da150ceb07b3d51a853c0ba6768f37dba3f | 97493ec373f65fa16c1184f5558f6771b8169a2f | Another broken derive path | Fixes #41 | diff --git a/Cargo.toml b/Cargo.toml
index f411b80..38f9df9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "arbitrary"
-version = "0.4.3" # Make sure this matches the derive crate version
-authors = ["Simonas Kazlauskas <arbitrary@kazlauskas.me>", "Brian L. Troutwine <brian@troutwine.us>", ... | 2 | 2 | 0 | [{"id": "G0", "claim": "Add a test that uses the derive without `use arbitrary::Arbitrary` so the breakage does not happen again.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a CHANGELOG.md entry for 0.4.4.", "category": "documentation", "verdict"... | null |
rust-fuzz__arbitrary__63 | rust-fuzz/arbitrary | 63 | defect | ab4adcf12045858148e93e70b85a93559ae6e214 | 26e4d3bec5b67e33ce099856b7729adae7b437dc | Add lifetime parameter to Arbitrary trait. Remove shrinking functionality. Implement Arbitrary for &str. | Fixes https://github.com/rust-fuzz/arbitrary/issues/43
Note: This merges into a new branch `staging-1.0` where we can put our changes prepping for a 1.0 release
To-do:
- [x] Remove `Shrinkable`
- [x] Fix `Cow` lifetime
- [x] Remove shrinking from README
- [x] Save shrinking code to a gist | diff --git a/src/lib.rs b/src/lib.rs
index f92850b..0879e8e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -32,6 +32,9 @@ pub mod unstructured;
#[doc(inline)]
pub use unstructured::Unstructured;
+mod shrinkable;
+pub use shrinkable::Shrinkable;
+
pub mod size_hint;
use core::cell::{Cell, RefCell, UnsafeCell};
@@ -... | 2 | 2 | 1 | [{"id": "G0", "claim": "The shrinking code is probably not worth maintaining and should be removed unless someone champions it; if it is kept, the trait should be named `Shrink` instead of `Shrinkable`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "cl... | null |
rust-fuzz__cargo-fuzz__212 | rust-fuzz/cargo-fuzz | 212 | defect | cb6d07edaaa4c2b887aa56a83461508017cfd053 | 5b5f7b145a5995dbde9245fc49850b9413c71ba9 | Stop requiring any sanitizers for libfuzzer | Safe rust should largely not require AddrSan, so instead just build
without any sanitizers and let the fuzzer hunt for panics faster.
This speeds things up by about 2x on one of my targets, and appears to find new interesting targets without any changes. | diff --git a/src/options.rs b/src/options.rs
index 1c96b41..ca8765f 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -18,6 +18,7 @@ pub enum Sanitizer {
Leak,
Memory,
Thread,
+ None,
}
impl fmt::Display for Sanitizer {
@@ -30,6 +31,7 @@ impl fmt::Display for Sanitizer {
Sanitiz... | 3 | 3 | 2 | [{"id": "G0", "claim": "libfuzzer may not work without at least one sanitizer enabled, so -sanitizer=none needs verification (and if the default is kept, a test for -s none; if it changes, a test for -s address).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1",... | null |
rust-fuzz__cargo-fuzz__221 | rust-fuzz/cargo-fuzz | 221 | defect | d34beefe727780412cbd1ac7e534efae9f0e971e | 90808ab7be5d39145e3bb5dee3bc395ed97134ca | Adds support for `fmt` subcomand for test case debug formatting | Adds support for https://github.com/rust-fuzz/cargo-fuzz/issues/220.
Subcommand routine is pretty rudimentary, where it basically checks to see if the test case exists, and then calls `run_fuzz_target_debug_formatter` to properly output the test case (structured input if `arbitrary` is implemented).
Let me know i... | diff --git a/src/main.rs b/src/main.rs
index 2117114..668ea4a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -97,6 +97,9 @@ enum Command {
/// Build fuzz targets
Build(options::Build),
+ /// Print debugging output for fuzz inputs
+ DebugFmt(options::DebugFmt),
+
/// List all the existing fuzz targ... | 6 | 6 | 1 | [{"id": "G0", "claim": "The pull request's code does not pass `cargo fmt` (the rustfmt CI check fails); the author is asked to run `cargo fmt` and update the PR.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new subcommand ships without any... | null |
rust-fuzz__cargo-fuzz__231 | rust-fuzz/cargo-fuzz | 231 | defect | 87c36a1deee8ca9b550fe034623a7445d7e8c770 | a320c86301972e437f5e62c1767ebacfe4501aed | Faster defaults | * Default to compiling in release mode with overflow checks and debug assertions enabled
* Speeds up fuzzing ~10x
* ~~Add command line option for controlling overflow checks~~
* Add command line option for forcing debug mode without optimizations
Resolves #230 | diff --git a/src/options.rs b/src/options.rs
index bd7c6f9..8e53f0d 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -57,18 +57,26 @@ impl FromStr for Sanitizer {
#[derive(Clone, Debug, StructOpt)]
pub struct BuildOptions {
- #[structopt(short = "O", long = "release")]
+ #[structopt(short = "D", long = "de... | 3 | 3 | 2 | [{"id": "G0", "claim": "The new flag should be named `--dev` to match the cargo profile name and avoid confusion with `--debug-assertions`, instead of `--debug`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The added `--overflow-checks` flag and its \"... | null |
rust-fuzz__cargo-fuzz__234 | rust-fuzz/cargo-fuzz | 234 | defect | 9f2f36888d10504f0a219bf1a91b72837d9fba56 | d778fa98b5aa36d03856b84b6ebc89059b478caa | Include build options with recommended reproduction command | Manually implementing `Display` for `BuildOptions` admittedly doesn't seem like the cleanest way of accomplishing this at first, but I think this is probably more maintainable than trying to write some sort of macro that interfaces with `StructOpt` to see what things are defaults and what the flags are.
Downsides ar... | diff --git a/src/options.rs b/src/options.rs
index 268a75f..b062426 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -15,7 +15,7 @@ use std::fmt as stdfmt;
use std::str::FromStr;
use structopt::StructOpt;
-#[derive(Debug, Clone, Copy)]
+#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Sanitizer {
Address,... | 1 | 1 | 0 | [{"id": "G0", "claim": "The reproduction command should avoid emitting `+nightly` when nightly is already the default rustup channel, with Manishearth adding that omitting `+nightly` unconditionally would also be fine.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-fuzz__cargo-fuzz__248 | rust-fuzz/cargo-fuzz | 248 | defect | aa7bfe005d49fb67b456c720aef73270e9bbe0d9 | c695eaf5acba1a918db0c18df5dca1c22419a67f | Generating raw code-based coverage data | This addresses #245. ~~It adds a `--coverage` option that generates a `.profraw` data file with source-based coverage information~~ It adds a `coverage` command that can be used to generate [source-based coverage information](https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/source-based-code-coverage.html... | diff --git a/README.md b/README.md
index 1364202..ddbc914 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,51 @@ You can also always find the full command-line options that are available with
$ cargo fuzz --help
```
+## Generating code coverage information
+
+Use the `--coverage` option to generate precise
+[sou... | 10 | 10 | 3 | [{"id": "G0", "claim": "The README's claim that coverage data is generated in the specified file is inaccurate, since the data is actually saved to a file with a `.profraw` extension appended, and the README should describe this behaviour precisely.", "category": "documentation", "verdict": "supported", "priority": "P1... | null |
rust-fuzz__cargo-fuzz__260 | rust-fuzz/cargo-fuzz | 260 | defect | e4ad715246c179258f0afa52c58bc9d2b250d0a7 | 52878e50c9bde4a92f0f3dab7561bf4fbba025ac | Allow stripping of dead code | The `-Clink-dead-code` flag was added to fix an error with certain
targets.
However, it can also cause problems.
Example: You depend on crate A which links to library B. A includes an
unused reference to `B::foo`. If the specific version of B we have is
missing `foo`, we now get a linker error whereas we would... | diff --git a/src/options.rs b/src/options.rs
index 6e71fee..70966e2 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -123,6 +123,11 @@ pub struct BuildOptions {
/// The attribute takes a default value `false`, ensuring that by default,
/// the coverage option will be disabled).
pub coverage: bool,
+
+... | 2 | 2 | 1 | [{"id": "G0", "claim": "structopt should infer the long name, so the explicit `long = \"strip-dead-code\"` on the strip_dead_code field shouldn't be necessary.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Add a small test that passes the `--st... | null |
rust-fuzz__cargo-fuzz__262 | rust-fuzz/cargo-fuzz | 262 | defect | 089dfae55534ae29a6323b4e0368ae6ebe9b34f8 | e233d8536cac294069ab7f9b12f184c930efcc89 | Relax fuzz dir name constraint | Fixes #238
I am not fully aware of the internals of this project and the chosen approach might not be the best. But hey, it is working.
```bash
cargo fuzz run --fuzz-dir some_fuzz_project_dir someTarget
``` | diff --git a/src/options/add.rs b/src/options/add.rs
index 4b47da5..63028a1 100644
--- a/src/options/add.rs
+++ b/src/options/add.rs
@@ -10,7 +10,7 @@ pub struct Add {
impl RunCommand for Add {
fn run_command(&mut self) -> Result<()> {
- let project = FuzzProject::find_existing()?;
+ let project =... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add support for a `--fuzz-dir` flag to all the other subcommands (add, build, cmin, coverage, fmt, init, list, tmin), not just `run`, for consistency, since they all execute commands inside the fuzz directory.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced... | null |
rust-fuzz__cargo-fuzz__264 | rust-fuzz/cargo-fuzz | 264 | defect | 2e496ca9cfe11de7cfb3d89b2299e93359ebc72f | e755878d60173cd7eda3743b3957ff2f59f91877 | [`FuzzProject::exec_fuzz`] Take `fuzz_dir` into consideration | Fixes #263 | diff --git a/src/project.rs b/src/project.rs
index 147dcab..f0c1594 100644
--- a/src/project.rs
+++ b/src/project.rs
@@ -459,14 +459,22 @@ impl FuzzProject {
eprintln!();
}
+ let fuzz_dir = if self.fuzz_dir_is_default_path() {
+ String::new()
+ } else... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request should also add a test covering the new fuzz_dir diagnostic behaviour.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-fuzz__cargo-fuzz__326 | rust-fuzz/cargo-fuzz | 326 | defect | 7d122d0ea60e5ddade0fa98a7a7686ec62ba4fe7 | 07030289825b27ca0cad998f74d31b4273da2be9 | Update some dependencies | - structopt v0.3 => clap v4.0
- remove cargo-binutils
- assert_cmd v0.12 => v2.0
- predicates v1.0 => v2.1 | diff --git a/Cargo.lock b/Cargo.lock
index 3c70470..47f2a26 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,111 +2,57 @@
# It is not intended for manual editing.
version = 3
-[[package]]
-name = "addr2line"
-version = "0.14.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a55f82cfe48... | 1 | 1 | 0 | [{"id": "G0", "claim": "Keep the comment in src/main.rs that explains why a hidden \"dummy\" positional argument is needed.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-fuzz__cargo-fuzz__349 | rust-fuzz/cargo-fuzz | 349 | defect | a860fd92bc183f1fed45583aa78691b684e80576 | 076c771fd4da9461f478cb2f4edcf7147e7bb5c0 | fix: use cargo-metadata to support init command in workspace | closes https://github.com/rust-fuzz/cargo-fuzz/issues/333
Instead of manually parsing the toml file and failing in workspace members, the package name and edition are obtained via cargo-metadata (this also seems to obviate the need to pass that path which is a breaking change to a public API). The way the tests are ... | diff --git a/Cargo.lock b/Cargo.lock
index 80fae15..e1733ee 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -55,12 +55,22 @@ dependencies = [
"serde",
]
+[[package]]
+name = "camino"
+version = "1.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c59e92b5a388f549b863a7bea62612c09f24c8... | 3 | 2 | 1 | [{"id": "G0", "claim": "Adding cargo-metadata may blow up compile times; the reviewer asks for `cargo clean; cargo build` timings on both `main` and this feature branch.", "category": "performance", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Rather than panicking via `expect`... | null |
rust-fuzz__cargo-fuzz__356 | rust-fuzz/cargo-fuzz | 356 | defect | ef67b11595a300f0dd6fc781b42f23d78300eaee | 7cebe428fe90c50ad37db3c242804697f7463baa | Do not list dependency packages by MetadataCommand | When following `cargo-fuzz` tutorial at
https://rust-fuzz.github.io/book/cargo-fuzz/tutorial.html, after executing `cargo fuzz init`, `fuzz/Cargo.toml` contains entry `[dependencies.matches]` instead of `[dependencies.url]`. This is caused by `MetadataCommand` listing dependency packages in addition to main packages w... | diff --git a/src/project.rs b/src/project.rs
index 27d08da..4150673 100644
--- a/src/project.rs
+++ b/src/project.rs
@@ -938,11 +938,11 @@ pub struct Manifest {
impl Manifest {
pub fn parse() -> Result<Self> {
- let metatdata = MetadataCommand::new().exec()?;
- let package = metatdata.packages.fir... | 1 | 1 | 1 | [{"id": "G0", "claim": "A regression test should be added that fails without this change and passes once it is introduced.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-fuzz__cargo-fuzz__357 | rust-fuzz/cargo-fuzz | 357 | defect | ef67b11595a300f0dd6fc781b42f23d78300eaee | dfa4010044b5aeb0c080ffdd7d7a9fc5a79fe753 | Enable use of cargo-fuzz without a separate workspace | This addresses https://github.com/rust-fuzz/cargo-fuzz/issues/345. Currently, `cargo-fuzz` defines an independent workspace
```
[workspace]
members = ["."]
```
which introduces some issues like caching setup, separate linting configs, etc.
The main reason for this seems to be a custom config for `profile.re... | diff --git a/src/options/init.rs b/src/options/init.rs
index 35250a5..2a418d7 100644
--- a/src/options/init.rs
+++ b/src/options/init.rs
@@ -8,6 +8,10 @@ pub struct Init {
/// Name of the first fuzz target to create
pub target: String,
+ #[arg(long, value_parser = clap::builder::BoolishValueParser::new()... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new --create-workspace flag should default to false rather than true, so that cargo fuzz init does not create a separate workspace by default.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The --create-workspace flag name is ... | null |
rust-headless-chrome__rust-headless-chrome__133 | rust-headless-chrome/rust-headless-chrome | 133 | defect | 07634d8ab0ef8a1a07df0bcc730b791d3763c7c1 | 1758573b6094e06ea97003e243c7d7f1373ef1d3 | Add response handling callback for tabs. | Adds a `Tab::enable_response_handler` method that installs a callback that will be called for each finished network request.
The callback receives the response info, and also a additional method that retrieves the payload. (I'm not so sure about that one, but I think it's the most straight-forward solution)
A tes... | diff --git a/src/browser/mod.rs b/src/browser/mod.rs
index b3283a1a..58ad3cd8 100644
--- a/src/browser/mod.rs
+++ b/src/browser/mod.rs
@@ -201,9 +201,13 @@ impl Browser {
util::Wait::with_timeout(Duration::from_secs(20))
.until(|| {
let tabs = self.tabs.lock().unwrap();
- ... | 4 | 3 | 3 | [{"id": "G0", "claim": "The pull request's build is not green, and atroche asks theduke to get the build green before merging.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "unclear"}, {"id": "G1", "claim": "The new response_handler test is flaky, sometimes failing on Travis although i... | null |
rust-headless-chrome__rust-headless-chrome__150 | rust-headless-chrome/rust-headless-chrome | 150 | defect | 34e5ca1e1f5546bce97f207e6cd5f08ff6b29584 | 484c08e09e5a2d39179d12b83d80bef674593975 | Implement Runtime.evaluate | Basic implementation of Runtime.evaluate based of `call_js_fn` | diff --git a/src/browser/tab/mod.rs b/src/browser/tab/mod.rs
index a90a3e28..dfdfbff8 100644
--- a/src/browser/tab/mod.rs
+++ b/src/browser/tab/mod.rs
@@ -663,6 +663,28 @@ impl<'a> Tab {
.call_method(protocol::debugger::methods::GetScriptSource { script_id })?
.script_source)
}
+
+ ///... | 2 | 2 | 0 | [{"id": "G0", "claim": "The doc comment for `evaluate` should not just refer to the external Devtools protocol syntax but describe the function itself.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The first sentence of the doc comment should be ... | null |
rust-headless-chrome__rust-headless-chrome__239 | rust-headless-chrome/rust-headless-chrome | 239 | defect | 1f63d697d8491fc222eb118a25684e380e00ecbb | 8df853cedbe28493be63eaccb21da8cb67d54abb | Fetch element by xpath | # Changes
https://github.com/mdrokz/rust-headless-chrome/commit/82c4bb9664d96db7e20ef6165a0c6181898fa44d - implemented feature to find elements by xpath and created a generic function that takes an enum to find element by either css selector or xpath query. | diff --git a/README.md b/README.md
index 3837b130..2022b6b8 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ browser testing / web crawling use cases, and there are several 'advanced' featu
## Quick Start
```rust
-use headless_chrome::{Browser, protocol::page::ScreenshotFormat};
+use headless_chrome::{Brows... | 5 | 5 | 4 | [{"id": "G0", "claim": "The midpoint fallback hardcodes a page-specific \"ShowAllChapters\" class selector (leftover from the author's testing), so the JS fallback returns the rect of an unrelated (usually missing) element instead of the target element.", "category": "correctness", "verdict": "supported", "priority": "... | null |
rust-headless-chrome__rust-headless-chrome__315 | rust-headless-chrome/rust-headless-chrome | 315 | defect | 8c71923e40b711f40a4224eb5096dd1f248fca83 | 0ba6efa99ef1d76a4d14dc3e488c2f822b52a67e | Created methods to get full HTML from page and elements | Adds two new methods for get the full HTML contents of a tab or a selected element.
The String returned by `tab.get_content()` can be parsed by [scraper](https://crates.io/crates/scraper) with the method `scraper::Html::parse_document`.
The String returned by `elem.get_content()` can be parsed by [scraper](https:/... | diff --git a/src/browser/tab/element/mod.rs b/src/browser/tab/element/mod.rs
index fee6291a..61e801d8 100644
--- a/src/browser/tab/element/mod.rs
+++ b/src/browser/tab/element/mod.rs
@@ -352,6 +352,18 @@ impl<'a> Element<'a> {
Ok(text)
}
+ /// Get the full HTML contents of the element.
+ ///
+ ... | 3 | 1 | 1 | [{"id": "G0", "claim": "Element::get_content should be changed to use the CDP DOM.getOuterHTML method instead of evaluating outerHTML in JS.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tab::get_content should be refactored to puppeteer's approach, seria... | null |
rust-headless-chrome__rust-headless-chrome__354 | rust-headless-chrome/rust-headless-chrome | 354 | defect | 29709b10248f5fc997c556b4982cd709034285c5 | 313ee81818544524c00a9dca5d601d475a29df2c | migrate websocket to tungstenite | As requested in https://github.com/atroche/rust-headless-chrome/pull/349#issuecomment-1366959108.
the difference between this pr and the referenced pr is that this uses `tungstenite` directly instead of `tokio-tungstenite` so this doesn't pull in async runtime.
Unlike `websocket` and `tokio-tungstenite`, `tungst... | diff --git a/Cargo.toml b/Cargo.toml
index 2354b773..64dda01a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,7 +23,8 @@ tempfile = "3"
thiserror = '1'
ureq = { version = "2.5", optional = true }
walkdir = { version = "2", optional = true }
-websocket = { version = "0.26", default_features = false, features = ["sync... | 2 | 2 | 0 | [{"id": "G0", "claim": "Questions whether there is a specific reason for replacing the Url::parse calls with Url::from_str, challenging the unmotivated change the PR made at every call site.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Asks that the br... | null |
rust-headless-chrome__rust-headless-chrome__363 | rust-headless-chrome/rust-headless-chrome | 363 | defect | 3e7c2ac6bd5f13a72f17534e009143b10031fda5 | 4af130f7b4dd807244519068a9921e006ee0732f | Fixed `clippy` lints + `docs.rs` fix | Fixed a few clippy warnings (and bypassed some others).
Also added a `#[cfg(not(docsrs))]` which should help with the docs.rs issues. | diff --git a/Cargo.toml b/Cargo.toml
index 55851f76..29a03237 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,7 @@ repository = "https://github.com/atroche/rust-headless-chrome"
readme = "README.md"
[dependencies]
-anyhow = '1'
+anyhow = "1"
base64 = "0.13"
derive_builder = "0.12"
directories = { version =... | 1 | 1 | 1 | [{"id": "G0", "claim": "Gating `auto_generate_cdp::init` with `#[cfg(not(docsrs))]` in build.rs means protocol.rs is not generated when building on docs.rs, so the crate, which depends on protocol.rs to compile, will not compile there.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "int... | null |
rust-headless-chrome__rust-headless-chrome__41 | rust-headless-chrome/rust-headless-chrome | 41 | defect | 5b834299ad2c68114061cd1fcee79aca93f33a0b | cd7b455b4705d55b892bf6782a3295d543f51997 | Handle browser / WS conn being closed while using tab | Fixes #32
| diff --git a/src/process.rs b/src/process.rs
index ca4a079f..b4b6346c 100644
--- a/src/process.rs
+++ b/src/process.rs
@@ -264,12 +264,12 @@ fn port_is_available(port: u16) -> bool {
#[cfg(test)]
mod tests {
- use super::*;
- use std::fs::File;
- use std::io::prelude::*;
use std::thread;
+ #[cfg(... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new test should drop the browser explicitly (e.g. `let (_, browser, tab) = dumb_server(...); drop(browser);`) so the test makes obvious that the browser is dropped while the tab is still in use.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}... | null |
rust-headless-chrome__rust-headless-chrome__83 | rust-headless-chrome/rust-headless-chrome | 83 | defect | fcd5670f03bb5224462dae08366f775f52feca22 | ac4e93e3a0c685702c9e0d09a0ccfbe9b266edf5 | Download revision based on const, unzip | #8
So, there's a few things to consider here:
- The ticket said "download latest chromium". However, while I have a mechanism to get the latest revision, I currently am just using hardcoded revision. I thought it may be troublesome to dl the latest revision *always* because if we don't update the library for a ... | diff --git a/Cargo.toml b/Cargo.toml
index 6545b731..e319fbe6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,9 +22,12 @@ rand = "0.6"
tempfile = "3"
toml = "0.4"
chrono = "0.4"
-which = "2.0"
base64 = "0.10"
derive_builder = "0.7.1"
+reqwest = "0.9"
+directories = "1.0"
+indicatif = "0.11"
+zip = "0.5"
[target... | 11 | 8 | 5 | [{"id": "G0", "claim": "Unzipping chrome-linux.zip with the zip crate took about 1 minute 15 seconds where the system unzip took under 2 seconds.", "category": "performance", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "REV_URL is defined once without a cfg guard alongside per-... | null |
rust-headless-chrome__rust-headless-chrome__86 | rust-headless-chrome/rust-headless-chrome | 86 | defect | 61442a6075d1204b515dc4c0d59f237c6d1b6b09 | c61d8fa20b876f6161c22c62ed7ab45d87ce0389 | Add wrappers for starting, stopping and taking JS coverage | Unlike Puppeteer (and related to this comment: https://github.com/atroche/rust-headless-chrome/issues/82#issuecomment-470167972) I'm not munging the data from Chrome into a friendlier format. We can always add helpers for that later if this causes confusion (or make it the default, to keep more in line with Puppeteer's... | diff --git a/src/browser/tab/mod.rs b/src/browser/tab/mod.rs
index 2f3bbfd8..9f0f43e6 100644
--- a/src/browser/tab/mod.rs
+++ b/src/browser/tab/mod.rs
@@ -1,28 +1,25 @@
-use failure::{Error, Fail};
-use log::*;
-
-use serde;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::sync::Mutex;
-... | 9 | 8 | 2 | [{"id": "G0", "claim": "Split the Profiler.enable call out of start_js_coverage into its own public method and provide a corresponding disable method, so the profiler can be switched off (e.g. for performance reasons).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1"... | null |
rust-itertools__itertools__1033 | rust-itertools/itertools | 1,033 | defect | b0942d6b84d47dec75c19e541859211423d857d9 | 76dcd1e25239f13f1ab4a712165c636915cb9a39 | Add `array_combinations_with_replacement` | This PR adds a new method for iterators called `array_combinations_with_replacement` which is similar to `combinations_with_replacement`, except for that it uses const generics and arrays.
This is similar to `array_combinations` and `combinations`.
I also generalized the underlying `CombinationsWithReplacement` ty... | diff --git a/src/combinations.rs b/src/combinations.rs
index 54a027551..2122707e8 100644
--- a/src/combinations.rs
+++ b/src/combinations.rs
@@ -52,7 +52,16 @@ pub trait PoolIndex<T>: BorrowMut<[usize]> {
self.borrow().len()
}
}
+impl<T> PoolIndex<T> for Box<[usize]> {
+ type Item = Vec<T>;
+ fn ... | 5 | 4 | 3 | [{"id": "G0", "claim": "The qualified `core::borrow::Borrow::<[usize]>::borrow(&self.indices)` calls could simply be written as `self.indices.borrow()`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "The pull request's new functionality has no t... | null |
rust-itertools__itertools__1086 | rust-itertools/itertools | 1,086 | defect | 6c2e8f611d1d75ca4033dae2bc64ade8c1ac05e1 | 832cd72c573ebcb4ab02ec3ada66afd0b8f2af58 | New method circular_array_windows(). | This is very like the existing `circular_tuple_windows`, but imposes the minimum possible bounds on the input iterator: it must have cloneable items because each item is returned N times, and it must be Sized so that it can be stored in a struct. Unlike `circular_tuple_windows`, it doesn't require the input iterator it... | diff --git a/src/array_impl.rs b/src/array_impl.rs
new file mode 100644
index 000000000..d4391b4d0
--- /dev/null
+++ b/src/array_impl.rs
@@ -0,0 +1,256 @@
+use std::iter::{ExactSizeIterator, FusedIterator};
+
+/// An iterator over all windows, wrapping back to the first elements when the
+/// window would otherwise exc... | 10 | 8 | 1 | [{"id": "G0", "claim": "The adapter should not depend on Vec (e.g. via arrayvec or a fixed-size array ring buffer) so that it need not be gated on use_alloc.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "make_window could first update ringbuf with the n... | null |
rust-itertools__itertools__527 | rust-itertools/itertools | 527 | defect | 853f0642ff21a2af491d9287a4f86b87a53915f1 | 80046c69f62ec214c2d2d4d408bb4ab7ba27f6c4 | add .flatten_ok() | Closes #522 | diff --git a/src/flatten_ok.rs b/src/flatten_ok.rs
new file mode 100644
index 000000000..6298ba9e1
--- /dev/null
+++ b/src/flatten_ok.rs
@@ -0,0 +1,61 @@
+pub fn flatten_ok<I, T, E>(iter: I) -> FlattenOk<I, T, E>
+where
+ I: Iterator<Item = Result<T, E>>,
+ T: IntoIterator,
+{
+ FlattenOk { iter, inner: None }... | 8 | 7 | 0 | [{"id": "G0", "claim": "The `else` in `next()` is unnecessary — the match of the outer iterator should be executed whether or not `self.inner` held an inner iterator, since in the only skipped case there is an early `return`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id... | null |
rust-itertools__itertools__555 | rust-itertools/itertools | 555 | defect | 20c09bd4fed037fa3df6f2a6a1e717b01be89f11 | 57008516d7eae1e2a5b3787e3b3df233e3ebb841 | Add intersperse and intersperse_with free functions | Aside from automatic parameter conversion using `IntoIterator`, having
`intersperse` and `intersperse_with` as free functions makes it easier for
downstream code to avoid the `unstable_name_collisions` lint because of
lib core's own similarly named `Iterator` methods.
https://github.com/rust-lang/rust/issues/48919 | diff --git a/src/free.rs b/src/free.rs
index c78dc1d02..57192eb08 100644
--- a/src/free.rs
+++ b/src/free.rs
@@ -14,8 +14,8 @@ use alloc::{
string::String,
};
-#[cfg(feature = "use_alloc")]
use crate::Itertools;
+use crate::intersperse::{Intersperse, IntersperseWith};
pub use crate::adaptors::{
interle... | 3 | 2 | 2 | [{"id": "G0", "claim": "There seems to be a problem in the pull request's CI run (the change as submitted fails CI).", "category": "build", "verdict": "supported", "priority": "P0", "scope": "unclear"}, {"id": "G1", "claim": "The doc comment on the intersperse_with free function should link to Iterator::intersperse_wit... | null |
rust-itertools__itertools__648 | rust-itertools/itertools | 648 | defect | a8fd3bc4fb0e1cbd31e40d1c9519ec10c16c38b4 | de6c87e9fc1b86c764ea15fcae983ec0d8248301 | Add all_equal_value method | This resolves https://github.com/rust-itertools/itertools/issues/495 by adding an `all_equal_value` method.
(I'm not certain it's valuable enough to add, but thought I might as well submit a PR to find out.) | diff --git a/src/lib.rs b/src/lib.rs
index f91968870..74a868d45 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -904,7 +904,7 @@ pub trait Itertools : Iterator {
/// Return an iterator adaptor that flattens every `Result::Ok` value into
/// a series of `Result::Ok` values. `Result::Err` values are unchanged.
- ... | 2 | 1 | 1 | [{"id": "G0", "claim": "The new all_equal_value should return the information learned on failure — e.g. Result<T, Option<(T, T)>> carrying the first two non-equal elements — instead of collapsing everything into Option<T>.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": ... | null |
rust-itertools__itertools__683 | rust-itertools/itertools | 683 | defect | 5c21a870cd4eeb0b86f4c36aa07ebfec23110297 | e01a74b55dfa7ca129c17ee430c97818fd4aa646 | Fix #657 | This fix seemed very simple. Maybe I'm missing something?
Fixes #657. | diff --git a/src/groupbylazy.rs b/src/groupbylazy.rs
index a5a321df4..80c6f09f3 100644
--- a/src/groupbylazy.rs
+++ b/src/groupbylazy.rs
@@ -19,7 +19,7 @@ impl<A, K, F: ?Sized> KeyFunction<A> for F
/// `ChunkIndex` acts like the grouping key function for `IntoChunks`
-#[derive(Debug)]
+#[derive(Debug, Clone)]
str... | 1 | 1 | 0 | [{"id": "G0", "claim": "Avoid duplicating the chunk-matching loop in the chunks() test and instead zip the original and cloned grouper with an equality assertion, so the test makes explicit that the clone produces the same output.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}... | null |
rust-itertools__itertools__740 | rust-itertools/itertools | 740 | defect | 6683438d30456c8916d5374be6f30b7acec7c312 | 77cf2608c883a26c6d2dfa081d465979e3ddeae7 | clippy | Co-authored-by: warren2k <846021+warren2k@users.noreply.github.com>
| diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 92122cca0..ebf558dca 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -35,7 +35,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- - run: cargo check ${{ matr... | 4 | 3 | 1 | [{"id": "G0", "claim": "CI should run clippy only on the MSRV toolchain, because clippy recommendations that violate MSRV are not actionable.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The pull request should not suppress deprecation and unstable-name-... | null |
rust-itertools__itertools__761 | rust-itertools/itertools | 761 | defect | 6ffdac103cf72dfd3b62a4de6dc25440b942e473 | 84e774f1109ce76746b809950e6a2e5c78650749 | Implement `ExactSizeIterator` for `Tuples` | I was hunting missing `size_hint` specializations for a few weeks now and from my notes, `Tuples` is apparently the penultimate one.
(`TupleCombinations` should be the last one.) | diff --git a/src/tuple_impl.rs b/src/tuple_impl.rs
index ba1c69df6..7f3d9f894 100644
--- a/src/tuple_impl.rs
+++ b/src/tuple_impl.rs
@@ -105,6 +105,27 @@ where
fn next(&mut self) -> Option<Self::Item> {
T::collect_from_iter(&mut self.iter, &mut self.buf)
}
+
+ fn size_hint(&self) -> (usize, Option... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add explanatory comments for future passerby to the size_hint implementation, per the suggested rewrite of the variables.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-itertools__itertools__763 | rust-itertools/itertools | 763 | defect | 6ffdac103cf72dfd3b62a4de6dc25440b942e473 | d05fc14d8ea29153aaf332000dc2b38c4b706d5e | `TupleCombinations`: `size_hint` and `count` | This was definitely simpler to implement than it was for `Combinations` (with vector items). The only difficulty is that it's recursive with a macro.
According to my notes, all iterators that should have a `size_hint` specialization now have. I like that.
The `count_ident` macro is moved to be available library-w... | diff --git a/src/adaptors/mod.rs b/src/adaptors/mod.rs
index 4bc50eaa0..90cf46eed 100644
--- a/src/adaptors/mod.rs
+++ b/src/adaptors/mod.rs
@@ -14,7 +14,7 @@ pub use self::map::{map_into, map_ok, MapInto, MapOk};
#[cfg(feature = "use_alloc")]
pub use self::multi_product::*;
-use crate::size_hint;
+use crate::size_... | 2 | 2 | 1 | [{"id": "G0", "claim": "E002 uses `checked_binomial` in the non-`use_alloc`-gated src/adaptors/mod.rs while the function lives behind the `use_alloc` feature in src/combinations.rs, so the crate fails to build without that feature; the author asks where to move the function and proposes adaptors/mod.rs.", "category": "... | null |
rust-itertools__itertools__765 | rust-itertools/itertools | 765 | defect | 6ffdac103cf72dfd3b62a4de6dc25440b942e473 | 9644b606769b7ca06483a11c34d8efe6afe7f329 | `Powerset::fold` specialization | Related to #755
Rank | Description | `powerset_0_fold` (µs) | `powerset_1_fold` (µs) | `powerset_2_fold` (µs) | `powerset_4_fold` (µs) | `powerset_8_fold` (µs) | `powerset_12_fold` (µs)
------|-----------------------|--------------------------|--------------------------|-----------------------... | diff --git a/benches/powerset.rs b/benches/powerset.rs
index f5862a416..018333d31 100644
--- a/benches/powerset.rs
+++ b/benches/powerset.rs
@@ -20,6 +20,17 @@ fn powerset_n(c: &mut Criterion, n: usize) {
});
}
+fn powerset_n_fold(c: &mut Criterion, n: usize) {
+ let id = format!("powerset {} fold", n);
+ ... | 1 | 1 | 1 | [{"id": "G0", "claim": "A specializations test for Powerset should be added, following the guidance in PR #764.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-itertools__itertools__772 | rust-itertools/itertools | 772 | defect | 2ec463c7c6aa8abe159850f89712cc9e650b34a7 | 9984eb05299730689698bd389f225dea1036775b | Specialize `WithPosition::fold` | Each call to `f` is done with a `Position` variant known at compile time so I think it might be optimized away in some cases?
Without specialization: [5.3231 µs 5.3487 µs 5.3806 µs]
With specialization: [2.6974 µs 2.7042 µs 2.7132 µs]
We should mention #755 in PRs that specialize `fold` (such as this ... | diff --git a/benches/bench1.rs b/benches/bench1.rs
index 084567177..c04bb3046 100644
--- a/benches/bench1.rs
+++ b/benches/bench1.rs
@@ -2,6 +2,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion};
use itertools::free::cloned;
use itertools::iproduct;
use itertools::Itertools;
+use itertools::... | 2 | 2 | 0 | [{"id": "G0", "claim": "Setting `handled_first = true` inside `WithPosition::fold` appears unnecessary, since `self` is consumed and the field seems unused afterwards.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "`fold` calls `peekable.next` o... | null |
rust-itertools__itertools__925 | rust-itertools/itertools | 925 | defect | dd6a56932141c8b18b9d479eba30134c5afbfb88 | 26ba76a9d47f71335ac399092bfa328cbbe4b885 | Add k_smallest_relaxed and variants | This implements the algorithm described [in](https://quickwit.io/blog/top-k-complexity) which consumes twice the amount of memory as the existing `k_smallest` algorithm but achieves linear time in the number of elements in the input.
I expect this to fail the MSRV job as `select_nth_unstable` was stabilized in 1.49 ... | diff --git a/src/k_smallest.rs b/src/k_smallest.rs
index 7b2f62ea1..9088c1b6e 100644
--- a/src/k_smallest.rs
+++ b/src/k_smallest.rs
@@ -88,6 +88,45 @@ where
storage
}
+pub(crate) fn k_smallest_relaxed_general<I, F>(iter: I, k: usize, mut comparator: F) -> Vec<I::Item>
+where
+ I: Iterator,
+ F: FnMut(&I:... | 7 | 5 | 2 | [{"id": "G0", "claim": "Add an assert such as assert_ne!(buf.len(), buf.capacity()) before buf.push in k_smallest_relaxed_general so the compiler can cut the growth path and make the loop faster.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "There ... | null |
rust-itertools__itertools__961 | rust-itertools/itertools | 961 | defect | 9f5256f34fb206f70d94f408b3dc33929067a43b | 7b58706c4e8bcd246548603038d982cd651622ba | ci: Run most tests with miri | This PR additionally reduces the size of some heavy tests to reduce their running time. I don't think these reductions will hinder their bug-detecting power too much. | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4b8dcf189..0c5d25fe2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -54,6 +54,19 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features
+ miri:
+ runs-on: ubuntu-latest
+ env:
... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new miri CI job uses nextest, which does not run doctests, so doctests would not be checked under miri even though we could want to run miri on some of them.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-lang-nursery__lazy-static.rs__103 | rust-lang-nursery/lazy-static.rs | 103 | defect | 3fd7d006d2a2e42b6d2523e70deec87fcd7bde7b | f0f544753293a67aa7e29304e99c4601e4174cba | Automatically use the allocation-free API for Rust 1.27.0+. | Introduces a buildscript to help decide which implementation to use by default. If using a version of Rust >= 1.27.0, what I've renamed the "inline" implementation will be automatically selected. On older versions of Rust, what I'm calling the "heap" implementation (previously the default one) will be selected. Origina... | diff --git a/.travis.yml b/.travis.yml
index 5a56115..820eec3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,8 @@ matrix:
- cargo bench
- cargo test --features nightly
- cargo bench --features nightly
+ - CARGO_CFG_LAZY_STATIC_HEAP_IMPL=1 cargo test
+ - CARGO_CFG_LAZY_S... | 4 | 4 | 1 | [{"id": "G0", "claim": "The cfg attributes could be simplified by rolling the nightly feature check into the version check in the build script, so the heap impl is only selected for pre-1.27 non-nightly compilers and nightly stays a marker for spin.", "category": "design", "verdict": "supported", "priority": "P2", "sco... | null |
rust-lang-nursery__lazy-static.rs__90 | rust-lang-nursery/lazy-static.rs | 90 | defect | 72424ade4e7e306722fc0e48f6d2aa1bdbfe09bc | 84cebeff5c1de5eb5e03653880cdd9e58c8a8438 | Add support for compiler tests | This is an initial version of compiler tests. So far it should work on travis, appveyor is a bit harder to achieve, because there's no simple way to add testing with specified features only on nightly. Please don't merge yet, because I want to at least try to make them run on appveyor as well.
Moreover due to the de... | diff --git a/.travis.yml b/.travis.yml
index f0dc1f3..1b73590 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,6 +15,8 @@ script:
travis-cargo --only nightly build -- --features spin_no_std &&
travis-cargo --only nightly test -- --features spin_no_std &&
travis-cargo --only nightly bench -- --features spin_no... | 2 | 1 | 1 | [{"id": "G0", "claim": "The compiletest_rs dependency could be declared as a dev-dependency instead of a regular dependency.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The compile tests fail to find the lazy_static crate (linker errors on appveyor, and... | null |
rust-lang__annotate-snippets-rs__105 | rust-lang/annotate-snippets-rs | 105 | defect | e86a32279a15860c73721731f096b0551b5710dc | a87c1d9a1e02668517a92f3f2986bacd44990e03 | Fix margin | `Margin` was being utilized for a whole `Message` when it really should be per `Snippet`, since that is what is displayed together. `Margin` should also be calculated by `annotate-snippets` and not passed in, as we know how to figure everything out.
To fix these problems, this PR does the following:
- Grouped a `Sn... | diff --git a/src/renderer/display_list.rs b/src/renderer/display_list.rs
index 05c19100..9e2d4e85 100644
--- a/src/renderer/display_list.rs
+++ b/src/renderer/display_list.rs
@@ -38,12 +38,18 @@ use std::{cmp, fmt};
use crate::renderer::{stylesheet::Stylesheet, Margin, Style};
+const ANONYMIZED_LINE_NUM: &str = "L... | 1 | 1 | 0 | [{"id": "G0", "claim": "Derive Debug for DisplaySet instead of hand-writing the fmt::Debug impl.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-lang__annotate-snippets-rs__147 | rust-lang/annotate-snippets-rs | 147 | defect | babde1cd2ee45b7e1abe14b90d74b8385867100d | 67ea82154dac3ebaae1394a9cd4bc4e14f759307 | chore: Adopt '_rust/main' template | I needed to update the pre-commit Action and decided this would make it easier | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 87baaab1..2964a8fe 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,7 +23,7 @@ jobs:
permissions:
contents: none
name: CI
- needs: [test, msrv, lockfile, docs, rustfmt, clippy]
+ needs: [test, msrv, ... | 2 | 2 | 2 | [{"id": "G0", "claim": "Changing the MSRV check from --lib --bins to --all-targets makes the msrv job fail because the divan dev-dependency has an MSRV of ~1.70.0 while the crate's MSRV is 1.65.0.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The n... | null |
rust-lang__annotate-snippets-rs__154 | rust-lang/annotate-snippets-rs | 154 | defect | c84e388949f0e06f4529de060c195e12e6531fbd | 21645ad032dd9117d811db57a5740b6a6406f94a | Fix origin position computation | This PR fixes an issue in the computation of the position in the origin file. When a highlighted section starts at the beginning of the line, the origin position used to point to the end of the previous line, instead of the start of the current line. This resulted in outputs like this:
```
error: title
--> origin... | diff --git a/src/renderer/display_list.rs b/src/renderer/display_list.rs
index 1823e61a..e2f0d74f 100644
--- a/src/renderer/display_list.rs
+++ b/src/renderer/display_list.rs
@@ -940,9 +940,20 @@ impl<'a> CursorLines<'a> {
#[derive(Copy, Clone, Debug, PartialEq)]
pub(crate) enum EndLine {
- Eof = 0,
- Crlf = ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The EndLine enum/len refactor should be split out into its own PR so it can be evaluated separately.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "The change makes highlighting EOF show the incorrect line-column; check main_range... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.