Skip to content
Snippets Groups Projects
Commit 7a425334 authored by Valentin Perrelle's avatar Valentin Perrelle
Browse files

[ivette] Small simplification

parent b3cff89a
No related branches found
No related tags found
No related merge requests found
...@@ -280,11 +280,7 @@ export interface Hint { ...@@ -280,11 +280,7 @@ export interface Hint {
/** Total order on hints. */ /** Total order on hints. */
export function byHint(a: Hint, b: Hint) { export function byHint(a: Hint, b: Hint) {
const ra = a.rank ?? 0; return (a.rank ?? 0) - (b.rank ?? 0);
const rb = b.rank ?? 0;
if (ra < rb) return -1;
if (ra > rb) return +1;
return 0;
} }
/** Type alias for functions that build hints list from a pattern. */ /** Type alias for functions that build hints list from a pattern. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment