fix all clippy lints and improve code quality #19

Merged
karx merged 3 commits from missing/dircord:master into master 2022-06-15 13:23:33 -05:00
Contributor

add .gitignore

add .gitignore
missing added 1 commit 2022-06-15 12:57:52 -05:00
Owner

Can you refactor lines 96 and 97 to use first_char instead of the first byte?

Can you refactor lines 96 and 97 to use `first_char` instead of the first byte?
Author
Contributor

Can you refactor lines 96 and 97 to use first_char instead of the first byte?

whoops, i think i changed that in the process of fixing the "panic on funny nickname" issue but i see that it makes no difference

> Can you refactor lines 96 and 97 to use `first_char` instead of the first byte? whoops, i think i changed that in the process of fixing the "panic on funny nickname" issue but i see that it makes no difference
missing added 1 commit 2022-06-15 13:04:31 -05:00
Owner

You can probably remove the block at line 335

You can probably remove the block at line 335
Author
Contributor

You can probably remove the block at line 335

no, if i do so the lock will be held until the end of the fn, through the select!

> You can probably remove the block at line 335 no, if i do so the lock will be held until the end of the `fn`, through the `select!`
Owner

code

I meant actually use the first_char that you compute using the loop (this is for people with unicode nicknames btw)

![code](https://cdn.discordapp.com/attachments/846061871843770460/986693787743059998/zdiupload.png) I meant actually use the first_char that you compute using the loop (this is for people with unicode nicknames btw)
Owner

You can probably remove the block at line 335

no, if i do so the lock will be held until the end of the fn, through the select!

Yeah you're right, I didn't see that

> > You can probably remove the block at line 335 > > no, if i do so the lock will be held until the end of the `fn`, through the `select!` Yeah you're right, I didn't see that
missing added 1 commit 2022-06-15 13:12:43 -05:00
Author
Contributor

code

I meant actually use the first_char that you compute using the loop (this is for people with unicode nicknames btw)

first_char in the loop was not actually the first char: it was the offset to the end of the first char, or the offset to the start of the second char. fixed up the weird naming and also used char_indicies for the second_char_offset

> ![code](https://cdn.discordapp.com/attachments/846061871843770460/986693787743059998/zdiupload.png) > > I meant actually use the first_char that you compute using the loop (this is for people with unicode nicknames btw) `first_char` in the loop was not actually the first char: it was the offset to the end of the first char, or the offset to the start of the second char. fixed up the weird naming and also used `char_indicies` for the `second_char_offset`
Owner

Alright LGTM, merging

Alright LGTM, merging
karx merged commit 638a57bfeb into master 2022-06-15 13:23:33 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: karx/dircord#19
No description provided.