Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8
4 changes: 0 additions & 4 deletions RustEnhanced.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
// Specify environment variables to add when running Cargo.
// "rust_env": {"PATH": "$PATH:$HOME/.cargo/bin"}

// If true, will use the environment from the user's login shell when
// running Cargo.
"rust_include_shell_env": true,

// For errors/warnings, how to show the inline message.
// "normal" - Shows the message inline.
// "popup" - Show popup on mouse hover.
Expand Down
5 changes: 0 additions & 5 deletions dependencies.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
{
"*": {
"*": [
"shellenv"
]
}
}
4 changes: 2 additions & 2 deletions rust/cargo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ def _toolchain_list(self):
# https://static.rust-lang.org/dist/index.html
# (See https://github.com/rust-lang-nursery/rustup.rs/issues/215)
shorthands = []
channels = ['nightly', 'beta', 'stable', '\d\.\d{1,2}\.\d']
pattern = '(%s)(?:-(\d{4}-\d{2}-\d{2}))?(?:-(.*))' % '|'.join(channels)
channels = ['nightly', 'beta', 'stable', r'\d\.\d{1,2}\.\d']
pattern = r'(%s)(?:-(\d{4}-\d{2}-\d{2}))?(?:-(.*))' % '|'.join(channels)
for toolchain in output:
m = re.match(pattern, toolchain)
# Should always match.
Expand Down
2 changes: 1 addition & 1 deletion rust/cargo_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
'allows_release': True,
'allows_features': True,
'allows_json': True,
'json_stop_pattern': '^\s*Running ',
'json_stop_pattern': r'^\s*Running ',
},
'check': {
'name': 'Check',
Expand Down
2 changes: 1 addition & 1 deletion rust/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def message_popup(view, point, hover_zone):
on_nav = functools.partial(_click_handler, view, hide_popup=True)
max_width = view.em_width() * 79
_sublime_show_popup(view, minihtml, sublime.COOPERATE_WITH_AUTO_COMPLETE,
point, max_width=max_width, on_navigate=on_nav)
point, max_width=int(max_width), on_navigate=on_nav)


STATUS_KEY = 'rust-msg-status'
Expand Down
6 changes: 0 additions & 6 deletions rust/rust_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import sys
import threading
import time
import shellenv
import sublime
import traceback

Expand Down Expand Up @@ -191,11 +190,6 @@ def run(self, window, cmd, cwd, listener, env=None,

# Configure the environment.
self.env = os.environ.copy()
if util.get_setting('rust_include_shell_env', True):
global USER_SHELL_ENV
if USER_SHELL_ENV is None:
USER_SHELL_ENV = shellenv.get_env()[1]
self.env.update(USER_SHELL_ENV)

rust_env = util.get_setting('rust_env')
if rust_env:
Expand Down
5 changes: 3 additions & 2 deletions tests/test_click_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def get_line(lineno):
# Filter out just the "Accept Replacement" phantoms.
click_urls = []
for phantom in phantoms:
click_urls.extend(re.findall(r'<a .*href="(replace:[^"]+)"',
phantom['content']))
urls = re.findall(r'<a .*href="(replace:[^"]+)"', phantom['content'])
urls = [url.replace('&amp;', '&') for url in urls]
click_urls.extend(urls)
self.assertEqual(len(click_urls), len(after))
for url, (lineno, expected_line) in zip(click_urls, after):
phantom['on_navigate'](url)
Expand Down