File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ async fn create_video(client: &Client<OpenAIConfig>) -> Result<VideoJob, Box<dyn
6969#[ tokio:: main]
7070async fn main ( ) -> Result < ( ) , Box < dyn Error > > {
7171 let client = Client :: new ( ) ;
72- let _video = create_video ( & client) . await ?;
72+ let video = create_video ( & client) . await ?;
7373 // wait for above video to be "completed"
7474 tokio:: time:: sleep ( tokio:: time:: Duration :: from_secs ( 5 ) ) . await ;
7575 let videos = client. videos ( ) . list ( & [ ( "limit" , "100" ) ] ) . await ?;
@@ -92,12 +92,10 @@ async fn main() -> Result<(), Box<dyn Error>> {
9292 }
9393 }
9494
95- for video in videos. data {
96- println ! (
97- "\n Video deleted: {:?}" ,
98- client. videos( ) . delete( & video. id) . await ?
99- ) ;
100- }
95+ println ! (
96+ "\n Video deleted: {:?}" ,
97+ client. videos( ) . delete( & video. id) . await ?
98+ ) ;
10199
102100 Ok ( ( ) )
103101}
You can’t perform that action at this time.
0 commit comments