1
4
Fork
You've already forked statusline
1

Assorted block simplifications #2

Merged
sylfn merged 5 commits from purplesyringa/statusline:blocks into main 2025年11月15日 05:28:11 +01:00
Contributor
Copy link
No description provided.
sylfn approved these changes 2025年11月15日 04:30:09 +01:00
Dismissed
sylfn left a comment
Copy link

lgtm

lgtm
sylfn approved these changes 2025年11月15日 04:30:53 +01:00
Dismissed
sylfn left a comment
Copy link

lgtm but on second commit?

lgtm but on second commit?
Author
Contributor
Copy link

lgbt

lgbt
sylfn changed title from (削除) WIP: Simplify BuildInfo (削除ここまで) to WIP: Assorted block simplifications 2025年11月15日 04:32:02 +01:00
Owner
Copy link

me when i force push on main :/

i forgor to clippy and now there's a small patch for src/block/git.rs that fixes it

me when i force push on main :/ i forgor to clippy and now there's a small patch for `src/block/git.rs` that fixes it
@ -24,0 +19,4 @@
.file_name()
.to_str()
.unwrap_or_default()
.ends_with(":2,")
Owner
Copy link

.to_str().unwrap().ends_with() does not look that nice (yeah i wrote that about a year ago but still)

maybe try using slice::ends_with? i tried finding something that could convert OsString/OsStr to [u8] but couldn't find anything suitable

upd: std::os::unix::ffi::OsStrExt::as_bytes can be used but forces unix (do we care?)

`.to_str().unwrap().ends_with()` does not look that nice (yeah i wrote that about a year ago but still) maybe try using `slice::ends_with`? i tried finding something that could convert `OsString`/`OsStr` to `[u8]` but couldn't find anything suitable upd: `std::os::unix::ffi::OsStrExt::as_bytes` can be used but forces unix (do we care?)
Author
Contributor
Copy link

fixed in the latest commit with as_encoded_bytes

fixed in the latest commit with `as_encoded_bytes`
Owner
Copy link

yeah fair (looks like it's zero-cost)

yeah fair (looks like it's zero-cost)
purplesyringa marked this conversation as resolved
sylfn left a comment
Copy link

:3

:3
sylfn changed title from (削除) WIP: Assorted block simplifications (削除ここまで) to Assorted block simplifications 2025年11月15日 05:27:02 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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
sylfn/statusline!2
Reference in a new issue
sylfn/statusline
No description provided.
Delete branch "purplesyringa/statusline:blocks"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?