about summary refs log tree commit diff stats
path: root/sys/nixpkgs/pkgs/yt/src/bin/ytc
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-20 18:38:18 +0100
committerSoispha <soispha@vhack.eu>2024-01-20 18:38:18 +0100
commitb53a8d82a07c29010a690b7126795fd7ddcabe0c (patch)
tree203dd0581950f9acb75881383d4b6fbc849e91af /sys/nixpkgs/pkgs/yt/src/bin/ytc
parentfix(sys/nixpkgs/yt/constants): Add extension to last selection path (diff)
downloadnixos-config-b53a8d82a07c29010a690b7126795fd7ddcabe0c.tar.gz
nixos-config-b53a8d82a07c29010a690b7126795fd7ddcabe0c.zip
feat(sys/nixpkgs/yt): Add support for the 'url' command
This simply opens the youtube url in the browser
Diffstat (limited to 'sys/nixpkgs/pkgs/yt/src/bin/ytc')
-rw-r--r--sys/nixpkgs/pkgs/yt/src/bin/ytc/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nixpkgs/pkgs/yt/src/bin/ytc/main.rs b/sys/nixpkgs/pkgs/yt/src/bin/ytc/main.rs
index 437df803..3fa3148d 100644
--- a/sys/nixpkgs/pkgs/yt/src/bin/ytc/main.rs
+++ b/sys/nixpkgs/pkgs/yt/src/bin/ytc/main.rs
@@ -37,7 +37,7 @@ fn main() -> Result<()> {
                 )
                 .context("Failed to deserialize json output")?;
 
-                if json.len() == 0 {
+                if json.is_empty() {
                     bail!("Could not find a video with id: {}", id);
                 }
                 assert_eq!(json.len(), 1);