cargo mutants: missed mutants in vortex-session
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- testing-qa
Research direction
Read vortex-session/src/registry.rs around Id::index, then inspect the linked mutation artifacts to see which uses of the returned index survive. Add or adjust tests that fail when index() returns the wrong value, and rerun cargo mutants -f vortex-session/src/registry.rs -F ':53:9:'; done means both reported mutants are killed.
Written by the indexing model from the issue text.
Description
The nightly run at fdb9507c04e2939724aa39c298653a8ea3fd3b49 found 2 mutants in vortex-session that survive the tests. They are in code that changed during the last day.
Artifacts:
- mutants-0
- mutants-2
- mutants-13
- mutants-1
- mutants-3
- mutants-6
- mutants-10
- mutants-5
- mutants-4
- mutants-11
- mutants-9
- mutants-12
- mutants-15
- mutants-14
vortex-session/src/registry.rs:53:9
replace Id::index -> usize with 0
--- vortex-session/src/registry.rs
+++ replace Id::index -> usize with 0
@@ -45,17 +45,17 @@
/// Returns the id's index in the global interner.
///
/// Ids are interned densely from zero, so the index can address a `Vec` with one slot per id.
/// An implementation detail of session registries, not part of the public API.
#[doc(hidden)]
#[inline]
pub fn index(&self) -> usize {
- self.0.into_usize()
+ 0 /* ~ changed by cargo-mutants ~ */
}
/// Returns the interned string.
pub fn as_str(&self) -> &str {
let s = INTERNER.resolve(&self.0);
// SAFETY: INTERNER is 'static and its arena is append-only, so resolved string
// pointers are stable for the lifetime of the program.
unsafe { &*(s as *const str) }
cargo mutants -f vortex-session/src/registry.rs -F ':53:9:'
vortex-session/src/registry.rs:53:9
replace Id::index -> usize with 1
--- vortex-session/src/registry.rs
+++ replace Id::index -> usize with 1
@@ -45,17 +45,17 @@
/// Returns the id's index in the global interner.
///
/// Ids are interned densely from zero, so the index can address a `Vec` with one slot per id.
/// An implementation detail of session registries, not part of the public API.
#[doc(hidden)]
#[inline]
pub fn index(&self) -> usize {
- self.0.into_usize()
+ 1 /* ~ changed by cargo-mutants ~ */
}
/// Returns the interned string.
pub fn as_str(&self) -> &str {
let s = INTERNER.resolve(&self.0);
// SAFETY: INTERNER is 'static and its arena is append-only, so resolved string
// pointers are stable for the lifetime of the program.
unsafe { &*(s as *const str) }
cargo mutants -f vortex-session/src/registry.rs -F ':53:9:'
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 239
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 684
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vortex-data/vortex
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
vortex-data/vortex#12628 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vortex-data/vortex#12491 ·
Maintainers usually reply within 1 day
-
Fallible constructor for nested_case_whenPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vortex-data/vortex#11425 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
vortex-data/vortex#12635 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
vortex-data/vortex#12634 ·
Maintainers usually reply within 1 day
All issues in vortex-data/vortex
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
marklauter/tsong#110 ·
-
docs enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wasm-bindgen/wasm-bindgen#5503 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
area: engine bug needs milestone
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Mudcrab-Team/mudcrab#1197 · 1 comment ·
Maintainers usually reply within 1 day