tl;dr: Avoid Box<T>
in general.
Actually, this rule is so important that the Rust Pointer Guide explicitly says the same. Therefore without a further ado, you should avoid Box<T>
except for these three cases:
-
When you absolutely need a trait object (
Box<Trait>
). But review carefully to see if it is indeed absolutely needed; you may try to generalize things too far, for example. -
When you have a recursive data structure. This may be mandatory when you have an inherently recursive data (e.g. scene graph), but it may also be a sign of the premature optimization. Again, review carefully to see if you need to write a separate data structure yourself, and use the
collection
crate if possible.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OAUTH_TOKEN = '<YOUR ACCESS TOKEN>' | |
OAUTH_SECRET = '<YOUR ACCESS TOKEN SECRET>' | |
CONSUMER_KEY = '<YOUR API KEY>' | |
CONSUMER_SECRET = '<YOUR API SECRET>' | |
# seconds | |
INTERVAL = 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>UserScript version 0.2.3</title> | |
<link rel="stylesheet" href="common.css" type="text/css" /> | |
</head> | |
<body> | |
<h1>UserScript 레퍼런스 <small>UserScript Reference</small></h1> |