Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Refactor terminal representation again #45

Merged
merged 12 commits into from
Nov 8, 2018

Conversation

swsnr
Copy link
Owner

@swsnr swsnr commented Nov 8, 2018

Replace Terminal and dynamic dispatch with TerminalCapabilities and static dispatch. Also allows for less complicated and more accurate conditional compilation.

swsnr added 12 commits October 30, 2018 21:21
Remove Terminal trait in favour of a TerminalCapabilities struct, and
explicitly pattern match over supported capabilities while rendering.

This removes boxing and dynamic dispatch, and makes different features
and internal behaviour like HTTP access more explicit.  We now also
explicitly check what and how certain features are supported while
rendering; this gets rids of the NotSupportedError thing and the kludge
to handle it in a special way which I never quite liked.

Also simply how we check for access to resources:  Remove the resource
enum and instead use Url directly.  Via the scheme an URL already tells
us whether it’s local or not, so we just rely on the scheme and file
path conversion now.  This makes resolving references in markdown files
and checking access much simpler.
Fix compiler warnings with --no-default-features by removing unused code.
Use empty bindings instead of drop to mark
variables as used
Only iterm2 actually uses it.

Fixes unused warning when compiling only with terminology.
[ci skip]
@swsnr swsnr merged commit 3f40829 into master Nov 8, 2018
@swsnr swsnr deleted the refactor-terminal-representation-again branch November 8, 2018 19:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant