Skip to content

Commit

Permalink
todo -> unreachable
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Aug 6, 2024
1 parent 0f2bafe commit 71fd9d7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
28 changes: 14 additions & 14 deletions ext/node/ops/crypto/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,79 +318,79 @@ impl OutputSizeUser for PrecomputedDigest {

impl Digest for PrecomputedDigest {
fn new() -> Self {
todo!()
unreachable!()
}

fn new_with_prefix(_data: impl AsRef<[u8]>) -> Self {
todo!()
unreachable!()
}

fn update(&mut self, _data: impl AsRef<[u8]>) {
todo!()
unreachable!()
}

fn chain_update(self, _data: impl AsRef<[u8]>) -> Self {
todo!()
unreachable!()
}

fn finalize(self) -> digest::Output<Self> {
self.0.into()
}

fn finalize_into(self, _out: &mut digest::Output<Self>) {
todo!()
unreachable!()
}

fn finalize_reset(&mut self) -> digest::Output<Self>
where
Self: digest::FixedOutputReset,
{
todo!()
unreachable!()
}

fn finalize_into_reset(&mut self, _out: &mut digest::Output<Self>)
where
Self: digest::FixedOutputReset,
{
todo!()
unreachable!()
}

fn reset(&mut self)
where
Self: digest::Reset,
{
todo!()
unreachable!()
}

fn output_size() -> usize {
todo!()
unreachable!()
}

fn digest(_data: impl AsRef<[u8]>) -> digest::Output<Self> {
todo!()
unreachable!()
}
}

impl Reset for PrecomputedDigest {
fn reset(&mut self) {
todo!()
unreachable!()
}
}

impl FixedOutputReset for PrecomputedDigest {
fn finalize_into_reset(&mut self, _out: &mut digest::Output<Self>) {
todo!()
unreachable!()
}
}

impl FixedOutput for PrecomputedDigest {
fn finalize_into(self, _out: &mut digest::Output<Self>) {
todo!()
unreachable!()
}
}

impl Update for PrecomputedDigest {
fn update(&mut self, _data: &[u8]) {
todo!()
unreachable!()
}
}
2 changes: 1 addition & 1 deletion ext/node/polyfills/internal/crypto/_randomFill.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function randomFillSync(buf, offset = 0, size) {
throw new ERR_INVALID_ARG_TYPE(
"buf",
["ArrayBuffer", "ArrayBufferView"],
buf
buf,
);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/unit_node/crypto/generate_keys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ for (const keyType of keyTypes) {

writeFileSync(
join("tests", "unit_node", "crypto", "testdata", "asymmetric.json"),
JSON.stringify(entries, null, 2)
JSON.stringify(entries, null, 2),
);

function exportAndWrite(name, key, format, type) {
Expand All @@ -141,7 +141,7 @@ function exportAndWrite(name, key, format, type) {
"crypto",
"testdata",
"asymmetric",
`${name}.${type}.${format}`
`${name}.${type}.${format}`,
);
writeFileSync(filename, pem);
}
2 changes: 1 addition & 1 deletion tests/unit_node/crypto/testdata/asymmetric.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
"name": "dh_modp14",
"type": "dh"
}
]
]

0 comments on commit 71fd9d7

Please sign in to comment.