From 0b3162a5832e5cfc57b98ca2c1982ae0f744eb28 Mon Sep 17 00:00:00 2001 From: Nicolas Gonzalez <74484996+nicdgonzalez@users.noreply.github.com> Date: Sat, 9 Nov 2024 19:03:54 -0500 Subject: [PATCH] docs: fix typos in API Reference documentation (#1015) * docs: fix incorrect caption for add_view code sample Changed "Using the `@app.view` decorator" to "Using the `app.add_view` method" to more accurately describe the code sample. * docs: fix logic error in rust code sample Fix the `square` function's logic to square the number instead of cubing it. --- .../pages/documentation/api_reference/using_rust_directly.mdx | 2 +- docs_src/src/pages/documentation/api_reference/views.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs_src/src/pages/documentation/api_reference/using_rust_directly.mdx b/docs_src/src/pages/documentation/api_reference/using_rust_directly.mdx index fae48bba6..453c76366 100644 --- a/docs_src/src/pages/documentation/api_reference/using_rust_directly.mdx +++ b/docs_src/src/pages/documentation/api_reference/using_rust_directly.mdx @@ -44,7 +44,7 @@ The first thing you need to is to create a Rust file. Let's call it `hello_world #[pyfunction] fn square(n: i32) -> i32 { - n * n * n + n * n // this is another comment } diff --git a/docs_src/src/pages/documentation/api_reference/views.mdx b/docs_src/src/pages/documentation/api_reference/views.mdx index ff61f35e9..fa3920e42 100644 --- a/docs_src/src/pages/documentation/api_reference/views.mdx +++ b/docs_src/src/pages/documentation/api_reference/views.mdx @@ -84,7 +84,7 @@ You can serve views in two ways: - Using an `@app.view` decorator. + Using the `app.add_view` method.