From b53a8d82a07c29010a690b7126795fd7ddcabe0c Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 20 Jan 2024 18:38:18 +0100 Subject: feat(sys/nixpkgs/yt): Add support for the 'url' command This simply opens the youtube url in the browser --- sys/nixpkgs/pkgs/yt/src/bin/ytc/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/nixpkgs/pkgs/yt/src/bin/ytc') 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); -- cgit 1.4.1