-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bar #1
bar #1
Conversation
…es are silent parse errors
todo: refaxctor how width/height is passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai review 40%.
Il me reste src et static.
|
||
// try to send to all clients, ignoring failures | ||
// disconnected clients will get swept up by `remove_stale_clients` | ||
let _ = future::join_all(send_futures).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
30 fichiers sur 50
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ | ||
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ | ||
/* Modules */ | ||
"module": "NodeNext", /* Specify what module code is generated. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor
Basé sur le .nvmrc et la l12 jte conseillerais de changer pour node16
car ce serait plus en phase avec les recommandations de Microsoft.
package.json
Outdated
"name": "snake-pipe-rust", | ||
"version": "0.1.0", | ||
"private": true, | ||
"description": "You only need this part for better experience with js development, not mandadtory.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typos
- a better ou an easier
- mandatory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Résolu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sur cette branche
tu as encore "mandadtory".
pub fn format_version_with_features( | ||
versions_with_features: IndexMap<String, Vec<String>>, | ||
) -> String { | ||
if versions_with_features.len() == 1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question
C'est étrange ça, tu gères le else
comme si c'était > 1
mais on peut t'en passer un vide, non?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est bien == 1
. Au cas où il n'y a qu'une seule version, inutile de spécifier les features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je veux dire que le code après ce if
que je considère comme un else—à cause du return
—est géré comme > 1
alors que potentiellement tu pourrais avoir 0
.
pub snake_length: u32, | ||
pub size: SizeOption, | ||
pub features_with_version: std::collections::HashMap<String, String>, | ||
pub metadatas: std::collections::HashMap<String, String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
c'est "uncountable"
metadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si tu veux remplacer metadatas
par uncountable
, il peut y avoir beaucoup de choses dedans.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si tu veux remplacer
metadatas
paruncountable
Non je veux dire que le pluriel et le singulier de metadata sont les mêmes.
i.e. metadata ne prend pas de s au pluriel
let _ = crossterm::terminal::enable_raw_mode(); | ||
let _ = gamestate_run(game_options); // this function returns when ctrl+c is hit | ||
let _ = crossterm::terminal::disable_raw_mode(); | ||
std::process::exit(130); // todo handle other signals ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor
magic number
const
None => { | ||
if list { | ||
println!("{}", "List of pipelines:".bold().underline()); | ||
generate_command(Some(Pipeline::Play), false, "play"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question
ya un moyen meta de référencer les cases utilisés dans le match
?
ça te permettrait de loop et de pas à avoir à maintenir ce if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
54/54
queue!( | ||
stdout, | ||
cursor::RestorePosition, | ||
terminal::Clear(terminal::ClearType::FromCursorDown), | ||
cursor::Show, | ||
) | ||
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor
minor
ça pourrait ptet être une fonction
voir l57
cursor::Show, | ||
) | ||
.unwrap(); | ||
std::process::exit(130); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | ||
* `<https://en.wikipedia.org/wiki/Box-drawing_character>` | ||
*/ | ||
fn render_line_wrapper(width: u32, top: bool) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor
- Le bool arg me semble être un code smell.
- Il serait plus clair d'avoir un
let line_corners =
et un seulformat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu peux élaborer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pour 1. ça vient de clean code—le bouquin—c'est un mauvais signe lorsque un bool arg est utilisé par une fonction ayant plusieurs arguments
e.g. pour un toggler c'est bon
pour 2. le match bool me semble over the top, en gros 2 couples de strings nommées top
et bottom
permettrait d'avoir qu'un seul call de format
@@ -0,0 +1,90 @@ | |||
import { makeRenderInfos } from './utils.js' | |||
|
|||
const renderInfos = makeRenderInfos(["score", "version"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor
pareil que #1 (comment)
info singulier et pluriel
No description provided.