pyrevisionstore: suppress warning of unused parameter

Summary:
The `known` parameter can't be renamed to `_known`, as the Python bindings
expect it to have the name `known`, however we can suppress the warning by
assigning it to a local variable named `_known`.  The compiler will optimize
this away.

Reviewed By: quark-zju

Differential Revision: D13239755

fbshipit-source-id: cc83be0441415dc3dd5959632dcab2af54d11513
This commit is contained in:
Mark Thomas 2018-12-10 03:34:15 -08:00 committed by Facebook Github Bot
parent bc9e47bfb6
commit ac25a0f173

View File

@ -156,6 +156,7 @@ py_class!(class historypack |py| {
}
def getancestors(&self, name: &PyBytes, node: &PyBytes, known: Option<&PyObject>) -> PyResult<PyDict> {
let _known = known;
<HistoryStorePyExt>::get_ancestors(self.store(py).as_ref(), py, name, node)
}