From 5446f97812b06d9c244a3d35dde69a7c84aed01b Mon Sep 17 00:00:00 2001 From: TechiePi Date: Tue, 12 Jul 2022 14:37:28 +0200 Subject: [PATCH] Apply sugggestions --- ctru-sys/src/bin/docstring-to-rustdoc.rs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/ctru-sys/src/bin/docstring-to-rustdoc.rs b/ctru-sys/src/bin/docstring-to-rustdoc.rs index 214e035..f7b1b72 100644 --- a/ctru-sys/src/bin/docstring-to-rustdoc.rs +++ b/ctru-sys/src/bin/docstring-to-rustdoc.rs @@ -1,3 +1,24 @@ +//! This script transforms _some_ Boxygen comments to Rustdoc format +//! +//! # Usage +//! +//! ``cargo run --bin docstring-to-rustdoc -- [location of the bindings.rs]`` +//! Example: ``cargo run --bin docstring-to-rustdoc -- src/bindings.rs`` +//! +//! # Transformations +//! +//! The following are _completely_ removed, but _its contents are kept_: +//! * ``@brief`` +//! * ``@ref`` +//! * ``@note`` +//! * ``@return`` +//! * ``@sa`` +//! * ``<`` +//! * ``[out]`` and ``[in]`` +//! +//! The followings are _partially_ transformed to Rustdoc format: +//! * ``@param`` + use std::{env, fs, io}; use std::path::Path; @@ -34,8 +55,7 @@ fn main() -> io::Result<()> { } }) .map(|v| { - // End-lines of bindings.rs are CRLF - v + "\r\n" + v + "\n" }) .collect::();