@@ -153,16 +153,16 @@ impl Client {
153
153
///
154
154
/// # Example
155
155
/// ```no_run
156
- /// #[tokio::test]
157
- /// async fn test_fetch_runtimes() {
158
- /// let client = piston_rs::Client::new();
156
+ /// # # [tokio::test]
157
+ /// # async fn test_fetch_runtimes() {
158
+ /// let client = piston_rs::Client::new();
159
159
///
160
- /// if let Ok(runtimes) = client.fetch_runtimes().await {
161
- /// assert!(!runtimes.is_empty());
162
- /// } else {
163
- /// // There was an error contacting Piston.
164
- /// }
160
+ /// if let Ok(runtimes) = client.fetch_runtimes().await {
161
+ /// assert!(!runtimes.is_empty());
162
+ /// } else {
163
+ /// // There was an error contacting Piston.
165
164
/// }
165
+ /// # }
166
166
/// ```
167
167
pub async fn fetch_runtimes ( & self ) -> Result < Vec < Runtime > , Box < dyn Error > > {
168
168
let endpoint = format ! ( "{}/runtimes" , self . url) ;
@@ -187,24 +187,24 @@ impl Client {
187
187
///
188
188
/// # Example
189
189
/// ```no_run
190
- /// #[tokio::test]
191
- /// async fn test_execute() {
192
- /// let client = piston_rs::Client::new();
193
- /// let executor = piston_rs::Executor::new()
194
- /// .set_language("rust")
195
- /// .set_version("1.50.0")
196
- /// .add_file(piston_rs::File::default().set_content(
197
- /// "fn main() { println!(\"42\"); }",
198
- /// ));
190
+ /// # # [tokio::test]
191
+ /// # async fn test_execute() {
192
+ /// let client = piston_rs::Client::new();
193
+ /// let executor = piston_rs::Executor::new()
194
+ /// .set_language("rust")
195
+ /// .set_version("1.50.0")
196
+ /// .add_file(piston_rs::File::default().set_content(
197
+ /// "fn main() { println!(\"42\"); }",
198
+ /// ));
199
199
///
200
- /// if let Ok(response) = client.execute(&executor).await {
201
- /// assert!(response.compile.is_some());
202
- /// assert!(response.run.is_ok());
203
- /// assert!(response.is_ok());
204
- /// } else {
205
- /// // There was an error contacting Piston.
206
- /// }
200
+ /// if let Ok(response) = client.execute(&executor).await {
201
+ /// assert!(response.compile.is_some());
202
+ /// assert!(response.run.is_ok());
203
+ /// assert!(response.is_ok());
204
+ /// } else {
205
+ /// // There was an error contacting Piston.
207
206
/// }
207
+ /// # }
208
208
/// ```
209
209
pub async fn execute ( & self , executor : & Executor ) -> Result < ExecResponse , Box < dyn Error > > {
210
210
let endpoint = format ! ( "{}/execute" , self . url) ;
0 commit comments