You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-04 05:40:29 +02:00
es: Fix a few untranslated messages on intro page. (#1199)
Part of Spanish translation #284 --------- Co-authored-by: Martin Geisler <martin@geisler.net>
This commit is contained in:
152
po/es.po
152
po/es.po
@ -929,7 +929,7 @@ msgid "Tokio"
|
|||||||
msgstr "Tokio"
|
msgstr "Tokio"
|
||||||
|
|
||||||
#: src/SUMMARY.md:293 src/exercises/concurrency/link-checker.md:126
|
#: src/SUMMARY.md:293 src/exercises/concurrency/link-checker.md:126
|
||||||
#: src/async/tasks.md:1 src/exercises/concurrency/chat-app.md:140
|
#: src/async/tasks.md:1 src/exercises/concurrency/chat-app.md:143
|
||||||
msgid "Tasks"
|
msgid "Tasks"
|
||||||
msgstr "Tasks"
|
msgstr "Tasks"
|
||||||
|
|
||||||
@ -1085,12 +1085,14 @@ msgstr "Brindarte idiomática propia de Rust."
|
|||||||
|
|
||||||
#: src/index.md:22
|
#: src/index.md:22
|
||||||
msgid "We call the first three course days Rust Fundamentals."
|
msgid "We call the first three course days Rust Fundamentals."
|
||||||
msgstr ""
|
msgstr "Llamamos a los tres primeros días del curso Fundamentos de Rust."
|
||||||
|
|
||||||
#: src/index.md:24
|
#: src/index.md:24
|
||||||
msgid ""
|
msgid ""
|
||||||
"Building on this, you're invited to dive into one or more specialized topics:"
|
"Building on this, you're invited to dive into one or more specialized topics:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Basándonos en esto, te invitamos a profundizar en uno o más temas "
|
||||||
|
"especializados:"
|
||||||
|
|
||||||
#: src/index.md:26
|
#: src/index.md:26
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -1151,7 +1153,6 @@ msgid "Assumptions"
|
|||||||
msgstr "Suposiciones"
|
msgstr "Suposiciones"
|
||||||
|
|
||||||
#: src/index.md:48
|
#: src/index.md:48
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"The course assumes that you already know how to program. Rust is a "
|
"The course assumes that you already know how to program. Rust is a "
|
||||||
"statically-typed language and we will sometimes make comparisons with C and "
|
"statically-typed language and we will sometimes make comparisons with C and "
|
||||||
@ -1725,6 +1726,7 @@ msgstr ""
|
|||||||
#: src/why-rust/modern.md:21 src/basic-syntax/compound-types.md:30
|
#: src/why-rust/modern.md:21 src/basic-syntax/compound-types.md:30
|
||||||
#: src/basic-syntax/references.md:23
|
#: src/basic-syntax/references.md:23
|
||||||
#: src/pattern-matching/destructuring-enums.md:35
|
#: src/pattern-matching/destructuring-enums.md:35
|
||||||
|
#: src/ownership/double-free-modern-cpp.md:55
|
||||||
#: src/error-handling/try-operator.md:48
|
#: src/error-handling/try-operator.md:48
|
||||||
#: src/error-handling/converting-error-types-example.md:50
|
#: src/error-handling/converting-error-types-example.md:50
|
||||||
#: src/concurrency/threads.md:30 src/async/async-await.md:25
|
#: src/concurrency/threads.md:30 src/async/async-await.md:25
|
||||||
@ -5863,9 +5865,10 @@ msgstr ""
|
|||||||
"duplica el `6` y el `8`."
|
"duplica el `6` y el `8`."
|
||||||
|
|
||||||
#: src/exercises/day-1/luhn.md:12
|
#: src/exercises/day-1/luhn.md:12
|
||||||
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
"After doubling a digit, sum the digits. So doubling `7` becomes `14` which "
|
"After doubling a digit, sum the digits if the result is greater than 9. So "
|
||||||
"becomes `5`."
|
"doubling `7` becomes `14` which becomes `1 + 4 = 5`."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Después de duplicar un dígito, se suman los dígitos que contiene. Por tanto, "
|
"Después de duplicar un dígito, se suman los dígitos que contiene. Por tanto, "
|
||||||
"si duplicas `7`, pasará a ser `14`, lo cual pasará a ser `5`."
|
"si duplicas `7`, pasará a ser `14`, lo cual pasará a ser `5`."
|
||||||
@ -6579,8 +6582,9 @@ msgstr ""
|
|||||||
"```"
|
"```"
|
||||||
|
|
||||||
#: src/ownership/double-free-modern-cpp.md:1
|
#: src/ownership/double-free-modern-cpp.md:1
|
||||||
msgid "Extra Work in Modern C++"
|
#, fuzzy
|
||||||
msgstr "Trabajo adicional en C++ moderno"
|
msgid "Defensive Copies in Modern C++"
|
||||||
|
msgstr "Double free en código C++ moderno"
|
||||||
|
|
||||||
#: src/ownership/double-free-modern-cpp.md:3
|
#: src/ownership/double-free-modern-cpp.md:3
|
||||||
msgid "Modern C++ solves this differently:"
|
msgid "Modern C++ solves this differently:"
|
||||||
@ -6692,6 +6696,28 @@ msgstr ""
|
|||||||
"`- - - - - - - - - - - - - -'\n"
|
"`- - - - - - - - - - - - - -'\n"
|
||||||
"```"
|
"```"
|
||||||
|
|
||||||
|
#: src/ownership/double-free-modern-cpp.md:57
|
||||||
|
msgid ""
|
||||||
|
"C++ has made a slightly different choice than Rust. Because `=` copies data, "
|
||||||
|
"the string data has to be cloned. Otherwise we would get a double-free when "
|
||||||
|
"either string goes out of scope."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ownership/double-free-modern-cpp.md:61
|
||||||
|
msgid ""
|
||||||
|
"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), "
|
||||||
|
"which is used to indicate when a value may be moved from. If the example had "
|
||||||
|
"been `s2 = std::move(s1)`, no heap allocation would take place. After the "
|
||||||
|
"move, `s1` would be in a valid but unspecified state. Unlike Rust, the "
|
||||||
|
"programmer is allowed to keep using `s1`."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/ownership/double-free-modern-cpp.md:66
|
||||||
|
msgid ""
|
||||||
|
"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type "
|
||||||
|
"which is being copied or moved."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/ownership/moves-function-calls.md:3
|
#: src/ownership/moves-function-calls.md:3
|
||||||
msgid ""
|
msgid ""
|
||||||
"When you pass a value to a function, the value is assigned to the function "
|
"When you pass a value to a function, the value is assigned to the function "
|
||||||
@ -11003,7 +11029,7 @@ msgid "Day 3: Morning Exercises"
|
|||||||
msgstr "Día 3: Ejercicios de la Mañana"
|
msgstr "Día 3: Ejercicios de la Mañana"
|
||||||
|
|
||||||
#: src/exercises/day-3/morning.md:3
|
#: src/exercises/day-3/morning.md:3
|
||||||
msgid "We will design a classical GUI library traits and trait objects."
|
msgid "We will design a classical GUI library using traits and trait objects."
|
||||||
msgstr "Diseñaremos una biblioteca GUI clásica de _traits_ y objetos _trait_."
|
msgstr "Diseñaremos una biblioteca GUI clásica de _traits_ y objetos _trait_."
|
||||||
|
|
||||||
#: src/exercises/day-3/morning.md:5
|
#: src/exercises/day-3/morning.md:5
|
||||||
@ -21332,10 +21358,11 @@ msgstr ""
|
|||||||
"servidor del chat transmite cada mensaje que recibe a todos los clientes."
|
"servidor del chat transmite cada mensaje que recibe a todos los clientes."
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:9
|
#: src/exercises/concurrency/chat-app.md:9
|
||||||
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/"
|
"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/"
|
||||||
"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]"
|
"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]"
|
||||||
"(https://docs.rs/tokio-websockets/0.3.2/tokio_websockets/) for the "
|
"(https://docs.rs/tokio-websockets/0.4.0/tokio_websockets/) for the "
|
||||||
"communication between the client and the server."
|
"communication between the client and the server."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Para ello, usaremos \\[un canal en abierto](https://docs.rs/tokio/latest/"
|
"Para ello, usaremos \\[un canal en abierto](https://docs.rs/tokio/latest/"
|
||||||
@ -21352,6 +21379,7 @@ msgid "`Cargo.toml`:"
|
|||||||
msgstr "`Cargo.toml`:"
|
msgstr "`Cargo.toml`:"
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:19
|
#: src/exercises/concurrency/chat-app.md:19
|
||||||
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
"```toml\n"
|
"```toml\n"
|
||||||
"[package]\n"
|
"[package]\n"
|
||||||
@ -21360,21 +21388,36 @@ msgid ""
|
|||||||
"edition = \"2021\"\n"
|
"edition = \"2021\"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"[dependencies]\n"
|
"[dependencies]\n"
|
||||||
"futures-util = \"0.3.28\"\n"
|
"futures-util = { version = \"0.3.28\", features = [\"sink\"] }\n"
|
||||||
"http = \"0.2.9\"\n"
|
"http = \"0.2.9\"\n"
|
||||||
"tokio = { version = \"1.28.1\", features = [\"full\"] }\n"
|
"tokio = { version = \"1.28.1\", features = [\"full\"] }\n"
|
||||||
"tokio-websockets = \"0.3.2\"\n"
|
"tokio-websockets = { version = \"0.4.0\", features = [\"client\", "
|
||||||
|
"\"fastrand\", \"server\", \"sha1_smol\"] }\n"
|
||||||
"```"
|
"```"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"```toml\n"
|
||||||
|
"[package]\n"
|
||||||
|
"name = \"link-checker\"\n"
|
||||||
|
"version = \"0.1.0\"\n"
|
||||||
|
"edition = \"2021\"\n"
|
||||||
|
"publish = false\n"
|
||||||
|
"\n"
|
||||||
|
"[dependencies]\n"
|
||||||
|
"reqwest = { version = \"0.11.12\", features = [\"blocking\", \"rustls-"
|
||||||
|
"tls\"] }\n"
|
||||||
|
"scraper = \"0.13.0\"\n"
|
||||||
|
"thiserror = \"1.0.37\"\n"
|
||||||
|
"```"
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:32
|
#: src/exercises/concurrency/chat-app.md:32
|
||||||
msgid "The required APIs"
|
msgid "The required APIs"
|
||||||
msgstr "Las APIs necesarias"
|
msgstr "Las APIs necesarias"
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:33
|
#: src/exercises/concurrency/chat-app.md:33
|
||||||
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
"You are going to need the following functions from `tokio` and "
|
"You are going to need the following functions from `tokio` and "
|
||||||
"[`tokio_websockets`](https://docs.rs/tokio-websockets/0.3.2/"
|
"[`tokio_websockets`](https://docs.rs/tokio-websockets/0.4.0/"
|
||||||
"tokio_websockets/). Spend a few minutes to familiarize yourself with the "
|
"tokio_websockets/). Spend a few minutes to familiarize yourself with the "
|
||||||
"API. "
|
"API. "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -21383,14 +21426,15 @@ msgstr ""
|
|||||||
"minutos a familiarizarte con la API. "
|
"minutos a familiarizarte con la API. "
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:37
|
#: src/exercises/concurrency/chat-app.md:37
|
||||||
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
"[WebsocketStream::next()](https://docs.rs/tokio-websockets/0.3.2/"
|
"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/"
|
||||||
"tokio_websockets/proto/struct.WebsocketStream.html#method.next): for "
|
"trait.StreamExt.html#method.next) implemented by `WebsocketStream`: for "
|
||||||
"asynchronously reading messages from a Websocket Stream."
|
"asynchronously reading messages from a Websocket Stream."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"[WebsocketStream::next()](https://docs.rs/tokio-websockets/0.3.2/"
|
"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/"
|
||||||
"tokio_websockets/proto/struct.WebsocketStream.html#method.next): para la "
|
"trait.SinkExt.html#method.send) implementado por `WebsocketStream`: permite "
|
||||||
"lectura asíncrona de mensajes de un flujo WebSocket."
|
"enviar mensajes de forma asíncrona a través de un flujo WebSocket."
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:39
|
#: src/exercises/concurrency/chat-app.md:39
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -21461,6 +21505,7 @@ msgstr "`src/bin/server.rs`:"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"```rust,compile_fail\n"
|
"```rust,compile_fail\n"
|
||||||
"use futures_util::sink::SinkExt;\n"
|
"use futures_util::sink::SinkExt;\n"
|
||||||
|
"use futures_util::stream::StreamExt;\n"
|
||||||
"use std::error::Error;\n"
|
"use std::error::Error;\n"
|
||||||
"use std::net::SocketAddr;\n"
|
"use std::net::SocketAddr;\n"
|
||||||
"use tokio::net::{TcpListener, TcpStream};\n"
|
"use tokio::net::{TcpListener, TcpStream};\n"
|
||||||
@ -21499,14 +21544,15 @@ msgid ""
|
|||||||
"```"
|
"```"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:102
|
#: src/exercises/concurrency/chat-app.md:103
|
||||||
#: src/exercises/concurrency/solutions-afternoon.md:208
|
#: src/exercises/concurrency/solutions-afternoon.md:210
|
||||||
msgid "`src/bin/client.rs`:"
|
msgid "`src/bin/client.rs`:"
|
||||||
msgstr "`src/bin/client.rs`:"
|
msgstr "`src/bin/client.rs`:"
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:106
|
#: src/exercises/concurrency/chat-app.md:107
|
||||||
msgid ""
|
msgid ""
|
||||||
"```rust,compile_fail\n"
|
"```rust,compile_fail\n"
|
||||||
|
"use futures_util::stream::StreamExt;\n"
|
||||||
"use futures_util::SinkExt;\n"
|
"use futures_util::SinkExt;\n"
|
||||||
"use http::Uri;\n"
|
"use http::Uri;\n"
|
||||||
"use tokio::io::{AsyncBufReadExt, BufReader};\n"
|
"use tokio::io::{AsyncBufReadExt, BufReader};\n"
|
||||||
@ -21514,10 +21560,10 @@ msgid ""
|
|||||||
"\n"
|
"\n"
|
||||||
"#[tokio::main]\n"
|
"#[tokio::main]\n"
|
||||||
"async fn main() -> Result<(), tokio_websockets::Error> {\n"
|
"async fn main() -> Result<(), tokio_websockets::Error> {\n"
|
||||||
" let mut ws_stream = ClientBuilder::from_uri(Uri::"
|
" let (mut ws_stream, _) =\n"
|
||||||
"from_static(\"ws://127.0.0.1:2000\"))\n"
|
" ClientBuilder::from_uri(Uri::from_static(\"ws://127.0.0.1:2000\"))\n"
|
||||||
" .connect()\n"
|
" .connect()\n"
|
||||||
" .await?;\n"
|
" .await?;\n"
|
||||||
"\n"
|
"\n"
|
||||||
" let stdin = tokio::io::stdin();\n"
|
" let stdin = tokio::io::stdin();\n"
|
||||||
" let mut stdin = BufReader::new(stdin).lines();\n"
|
" let mut stdin = BufReader::new(stdin).lines();\n"
|
||||||
@ -21529,37 +21575,37 @@ msgid ""
|
|||||||
"```"
|
"```"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:127
|
#: src/exercises/concurrency/chat-app.md:130
|
||||||
msgid "Running the binaries"
|
msgid "Running the binaries"
|
||||||
msgstr "Ejecutar los binarios"
|
msgstr "Ejecutar los binarios"
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:128
|
#: src/exercises/concurrency/chat-app.md:131
|
||||||
msgid "Run the server with:"
|
msgid "Run the server with:"
|
||||||
msgstr "Ejecuta el servidor con:"
|
msgstr "Ejecuta el servidor con:"
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:130
|
#: src/exercises/concurrency/chat-app.md:133
|
||||||
msgid ""
|
msgid ""
|
||||||
"```shell\n"
|
"```shell\n"
|
||||||
"cargo run --bin server\n"
|
"cargo run --bin server\n"
|
||||||
"```"
|
"```"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:134
|
#: src/exercises/concurrency/chat-app.md:137
|
||||||
msgid "and the client with:"
|
msgid "and the client with:"
|
||||||
msgstr "y el cliente con:"
|
msgstr "y el cliente con:"
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:136
|
#: src/exercises/concurrency/chat-app.md:139
|
||||||
msgid ""
|
msgid ""
|
||||||
"```shell\n"
|
"```shell\n"
|
||||||
"cargo run --bin client\n"
|
"cargo run --bin client\n"
|
||||||
"```"
|
"```"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:142
|
#: src/exercises/concurrency/chat-app.md:145
|
||||||
msgid "Implement the `handle_connection` function in `src/bin/server.rs`."
|
msgid "Implement the `handle_connection` function in `src/bin/server.rs`."
|
||||||
msgstr "Implementa la función `handle_connection` en `src/bin/server.rs`."
|
msgstr "Implementa la función `handle_connection` en `src/bin/server.rs`."
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:143
|
#: src/exercises/concurrency/chat-app.md:146
|
||||||
msgid ""
|
msgid ""
|
||||||
"Hint: Use `tokio::select!` for concurrently performing two tasks in a "
|
"Hint: Use `tokio::select!` for concurrently performing two tasks in a "
|
||||||
"continuous loop. One task receives messages from the client and broadcasts "
|
"continuous loop. One task receives messages from the client and broadcasts "
|
||||||
@ -21569,11 +21615,11 @@ msgstr ""
|
|||||||
"un bucle continuo. Una tarea recibe mensajes del cliente y los transmite. La "
|
"un bucle continuo. Una tarea recibe mensajes del cliente y los transmite. La "
|
||||||
"otra envía los mensajes que recibe el servidor al cliente."
|
"otra envía los mensajes que recibe el servidor al cliente."
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:146
|
#: src/exercises/concurrency/chat-app.md:149
|
||||||
msgid "Complete the main function in `src/bin/client.rs`."
|
msgid "Complete the main function in `src/bin/client.rs`."
|
||||||
msgstr "Completa la función principal en `src/bin/client.rs`."
|
msgstr "Completa la función principal en `src/bin/client.rs`."
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:147
|
#: src/exercises/concurrency/chat-app.md:150
|
||||||
msgid ""
|
msgid ""
|
||||||
"Hint: As before, use `tokio::select!` in a continuous loop for concurrently "
|
"Hint: As before, use `tokio::select!` in a continuous loop for concurrently "
|
||||||
"performing two tasks: (1) reading user messages from standard input and "
|
"performing two tasks: (1) reading user messages from standard input and "
|
||||||
@ -21585,7 +21631,7 @@ msgstr ""
|
|||||||
"desde la entrada estándar y enviarlos al servidor, y (2) recibir mensajes "
|
"desde la entrada estándar y enviarlos al servidor, y (2) recibir mensajes "
|
||||||
"del servidor y mostrárselos al usuario."
|
"del servidor y mostrárselos al usuario."
|
||||||
|
|
||||||
#: src/exercises/concurrency/chat-app.md:151
|
#: src/exercises/concurrency/chat-app.md:154
|
||||||
msgid ""
|
msgid ""
|
||||||
"Optional: Once you are done, change the code to broadcast messages to all "
|
"Optional: Once you are done, change the code to broadcast messages to all "
|
||||||
"clients, but the sender of the message."
|
"clients, but the sender of the message."
|
||||||
@ -24019,6 +24065,7 @@ msgid ""
|
|||||||
"\n"
|
"\n"
|
||||||
"// ANCHOR: setup\n"
|
"// ANCHOR: setup\n"
|
||||||
"use futures_util::sink::SinkExt;\n"
|
"use futures_util::sink::SinkExt;\n"
|
||||||
|
"use futures_util::stream::StreamExt;\n"
|
||||||
"use std::error::Error;\n"
|
"use std::error::Error;\n"
|
||||||
"use std::net::SocketAddr;\n"
|
"use std::net::SocketAddr;\n"
|
||||||
"use tokio::net::{TcpListener, TcpStream};\n"
|
"use tokio::net::{TcpListener, TcpStream};\n"
|
||||||
@ -24048,9 +24095,10 @@ msgid ""
|
|||||||
" incoming = ws_stream.next() => {\n"
|
" incoming = ws_stream.next() => {\n"
|
||||||
" match incoming {\n"
|
" match incoming {\n"
|
||||||
" Some(Ok(msg)) => {\n"
|
" Some(Ok(msg)) => {\n"
|
||||||
" let msg = msg.as_text()?;\n"
|
" if let Some(text) = msg.as_text() {\n"
|
||||||
" println!(\"From client {addr:?} {msg:?}\");\n"
|
" println!(\"From client {addr:?} {text:?}\");\n"
|
||||||
" bcast_tx.send(msg.into())?;\n"
|
" bcast_tx.send(text.into())?;\n"
|
||||||
|
" }\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" Some(Err(err)) => return Err(err.into()),\n"
|
" Some(Err(err)) => return Err(err.into()),\n"
|
||||||
" None => return Ok(()),\n"
|
" None => return Ok(()),\n"
|
||||||
@ -24087,7 +24135,7 @@ msgid ""
|
|||||||
"```"
|
"```"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/exercises/concurrency/solutions-afternoon.md:210
|
#: src/exercises/concurrency/solutions-afternoon.md:212
|
||||||
msgid ""
|
msgid ""
|
||||||
"```rust,compile_fail\n"
|
"```rust,compile_fail\n"
|
||||||
"// Copyright 2023 Google LLC\n"
|
"// Copyright 2023 Google LLC\n"
|
||||||
@ -24105,6 +24153,7 @@ msgid ""
|
|||||||
"// limitations under the License.\n"
|
"// limitations under the License.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"// ANCHOR: setup\n"
|
"// ANCHOR: setup\n"
|
||||||
|
"use futures_util::stream::StreamExt;\n"
|
||||||
"use futures_util::SinkExt;\n"
|
"use futures_util::SinkExt;\n"
|
||||||
"use http::Uri;\n"
|
"use http::Uri;\n"
|
||||||
"use tokio::io::{AsyncBufReadExt, BufReader};\n"
|
"use tokio::io::{AsyncBufReadExt, BufReader};\n"
|
||||||
@ -24112,10 +24161,10 @@ msgid ""
|
|||||||
"\n"
|
"\n"
|
||||||
"#[tokio::main]\n"
|
"#[tokio::main]\n"
|
||||||
"async fn main() -> Result<(), tokio_websockets::Error> {\n"
|
"async fn main() -> Result<(), tokio_websockets::Error> {\n"
|
||||||
" let mut ws_stream = ClientBuilder::from_uri(Uri::"
|
" let (mut ws_stream, _) =\n"
|
||||||
"from_static(\"ws://127.0.0.1:2000\"))\n"
|
" ClientBuilder::from_uri(Uri::from_static(\"ws://127.0.0.1:2000\"))\n"
|
||||||
" .connect()\n"
|
" .connect()\n"
|
||||||
" .await?;\n"
|
" .await?;\n"
|
||||||
"\n"
|
"\n"
|
||||||
" let stdin = tokio::io::stdin();\n"
|
" let stdin = tokio::io::stdin();\n"
|
||||||
" let mut stdin = BufReader::new(stdin).lines();\n"
|
" let mut stdin = BufReader::new(stdin).lines();\n"
|
||||||
@ -24126,8 +24175,11 @@ msgid ""
|
|||||||
" tokio::select! {\n"
|
" tokio::select! {\n"
|
||||||
" incoming = ws_stream.next() => {\n"
|
" incoming = ws_stream.next() => {\n"
|
||||||
" match incoming {\n"
|
" match incoming {\n"
|
||||||
" Some(Ok(msg)) => println!(\"From server: {}\", msg."
|
" Some(Ok(msg)) => {\n"
|
||||||
"as_text()?),\n"
|
" if let Some(text) = msg.as_text() {\n"
|
||||||
|
" println!(\"From server: {}\", text);\n"
|
||||||
|
" }\n"
|
||||||
|
" },\n"
|
||||||
" Some(Err(err)) => return Err(err.into()),\n"
|
" Some(Err(err)) => return Err(err.into()),\n"
|
||||||
" None => return Ok(()),\n"
|
" None => return Ok(()),\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
@ -24147,6 +24199,18 @@ msgid ""
|
|||||||
"```"
|
"```"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "Extra Work in Modern C++"
|
||||||
|
#~ msgstr "Trabajo adicional en C++ moderno"
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "[WebsocketStream::next()](https://docs.rs/tokio-websockets/0.3.2/"
|
||||||
|
#~ "tokio_websockets/proto/struct.WebsocketStream.html#method.next): for "
|
||||||
|
#~ "asynchronously reading messages from a Websocket Stream."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "[WebsocketStream::next()](https://docs.rs/tokio-websockets/0.3.2/"
|
||||||
|
#~ "tokio_websockets/proto/struct.WebsocketStream.html#method.next): para la "
|
||||||
|
#~ "lectura asíncrona de mensajes de un flujo WebSocket."
|
||||||
|
|
||||||
#~ msgid "Comparison"
|
#~ msgid "Comparison"
|
||||||
#~ msgstr "Comparación"
|
#~ msgstr "Comparación"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user