mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
Merge pull request #382 from Omar007/from-bkey_s_c
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Implement From<bkey_s_c> trait for BkeySC
This commit is contained in:
commit
e28050092f
@ -125,6 +125,16 @@ impl<'a> From<&'a c::bkey_i> for BkeySC<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> From<&'a c::bkey_s_c> for BkeySC<'a> {
|
||||||
|
fn from(k: &'a c::bkey_s_c) -> Self {
|
||||||
|
BkeySC {
|
||||||
|
k: unsafe { &*k.k },
|
||||||
|
v: unsafe { &*k.v },
|
||||||
|
iter: PhantomData,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub struct BkeySCToText<'a, 'b> {
|
pub struct BkeySCToText<'a, 'b> {
|
||||||
k: &'a BkeySC<'a>,
|
k: &'a BkeySC<'a>,
|
||||||
fs: &'b Fs,
|
fs: &'b Fs,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user