aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/post_build_commands.py
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-06-20 12:37:54 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-06-20 12:42:43 +0200
commit4d7f250159d71210eee3abaf3bd2f37d289c5844 (patch)
tree09b47444aecd12dc8edca1ccda77b5f259a8d5ff /python/servo/post_build_commands.py
parent836ae5fa48b7cb60dd801e6cd20becc1d839e8f5 (diff)
downloadservo-4d7f250159d71210eee3abaf3bd2f37d289c5844.tar.gz
servo-4d7f250159d71210eee3abaf3bd2f37d289c5844.zip
Clean up rustdoc run
1. The options specified in `rustdoc-with-private` are essentially the default now so we can remove this script. 2. `./mach browse-doc` is redundant with `./mach doc --open` which uses the underlying cargo functionality to browse the documentation. Fixes #29888.
Diffstat (limited to 'python/servo/post_build_commands.py')
-rw-r--r--python/servo/post_build_commands.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index afe8b12dfd4..a5d76134c4f 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -14,6 +14,7 @@ import os
import os.path as path
import subprocess
from shutil import copytree, rmtree, copy2
+from typing import List
import servo.util
@@ -242,7 +243,7 @@ class PostBuildCommands(CommandBase):
'params', nargs='...',
help="Command-line arguments to be passed through to cargo doc")
@CommandBase.build_like_command_arguments
- def doc(self, params, **kwargs):
+ def doc(self, params: List[str], **kwargs):
self.ensure_bootstrapped(rustup_components=["rust-docs"])
rustc_path = check_output(
["rustup" + BIN_SUFFIX, "which", "--toolchain", self.rust_toolchain(), "rustc"]
@@ -278,12 +279,3 @@ class PostBuildCommands(CommandBase):
static = path.join(self.context.topdir, "etc", "doc.servo.org")
for name in os.listdir(static):
copy2(path.join(static, name), path.join(docs, name))
-
- @Command('browse-doc',
- description='Generate documentation and open it in a web browser',
- category='post-build')
- def serve_docs(self):
- self.doc([])
- import webbrowser
- webbrowser.open("file://" + path.abspath(path.join(
- servo.util.get_target_dir(), "doc", "servo", "index.html")))